phpbot
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] User email validation brokenGot it, thanks!
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] User email validation brokenAh okay got it.
In this case we are using a GET param of the viewed page
?foo[user_id]=123
, which translated into ACFE like:{request:foo:user_id}
I can confirm it is working, since saving and loading works without any problems.
Only the email validation is failing, both for create and update forms.
Best
- This reply was modified 2 years, 3 months ago by phpbot.
Forum: Plugins
In reply to: [Advanced Custom Fields: Extended] User email validation brokenHey
Thanks a lot for the fast response
Can you please share a screenshot which part of the UI / which setting you are talking about?
Searching for a target UI element, but can’t find one. ??
Here is the first settings screen, if this already includes what you asked for?
Exact same error here, what can we do?
Forum: Plugins
In reply to: [Download Monitor] WooCommerce integration (extra product info/sheets)@cristianraiber-1 thanks for your answer.
Our use case is to offer product data as downloadable PDF for each product, so customers can download additional product related data as PDFs.
For example, offering product sheet downloads in a B2B WooCommerce store:
In some industry, it’s also a data sheet / product marketing sheet. It’s basically a one page document the 3rd party can take it with them to show it to the other folks.
Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock productsHere is a useful answer about sorting based on custom metadata: https://wordpress.stackexchange.com/a/109853/218274
For full details, check out: https://developer.www.ads-software.com/reference/classes/wp_query/#order-orderby-parameters
I guess you are looking for:
'orderby' => 'meta_value'
- This reply was modified 2 years, 11 months ago by phpbot.
Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock productsYou can add sorting by the custom meta field (orderby), to get latest/oldest products. Here is how to implement in the Query: https://stackoverflow.com/a/50937314/13765033
The class method, which returns the shortcode contents itself uses the WooCommerce built in
[products]
shortcode, which supports a variety of attributes, you can go ahead and extend the method to dynamically set these attributes to the finaldo_shortcode()
call. This way, you will be able to use all WooCommerce built-in attributes on the custom shortcode.Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock products@corentinco I can confirm the code is working for me.
Note that you have to be running on a minimum PHP Version of 8.0.0 to get things running smoothly (as noted in the plugin header comment).
If you are on PHP 8 and are facing an error message, feel free to post it here, so we can take a look into it.
Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock productsThanks, hooking into
cwginstock_trigger_status
and saving the back in stock timestamp to product meta to be able to select products that are in stock and got in stock in the last X days works fine.For everybody interested, here is a base version for a plugin doing the job:
<?php /** * Plugin Name: WooCommerce back in stock since * Requires PHP: 8.0 * Version: 1.0.0 */ class PhpBotWcBackInStockSince { private $metaKey = '_php_bot_wc_back_in_stock_since'; /** * constructor */ public function __construct() { add_action( hook_name: 'cwginstock_trigger_status', callback: [$this, 'saveSince'], accepted_args: 3, ); add_shortcode( tag: 'php_bot_wc_back_in_stock_since', callback: [$this, 'shortcode'], ); } function saveSince($id, $stockstatus, $obj) { update_post_meta($id, $this->metaKey, current_time('mysql')); } /** * [php_bot_wc_back_in_stock_since days="7"] */ function shortcode(array $atts): string { $atts = shortcode_atts( array( 'days' => 7, ), $atts, 'php_bot_wc_back_in_stock_since' ); $objs = $this->getProductsInStockSince($atts['days']); if (empty($objs)) { return ''; } $ids = array_map( function ($obj) { if ($obj->post_type === 'product_variation') { return $obj->post_parent; } return $obj->ID; }, $objs ); return do_shortcode( sprintf( '[products ids="%s"]', implode(',', $ids) ) ); } private function getProductsInStockSince(int $days): array { if ($days < 1) { return []; } $args = [ 'post_type' => ['product', 'product_variation'], 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => [ [ 'key' => '_stock', 'value' => 0, 'compare' => '>', ], [ 'key' => $this->metaKey, 'value' => date('Y-m-d H:i:s', strtotime('-' . $days . ' days')), 'compare' => '>=', ], ], ]; $query = new WP_Query($args); return $query->posts; } } new PhpBotWcBackInStockSince();
Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock productsAnd is there a hook provided by your plugin, which fires an action, when the product changes to back in stock?
Then we should be able to add an action, which saves a timestamp to the product meta, and we would be able to select the products with a meta query on WordPress.
Is there such an action hook?
Forum: Plugins
In reply to: [Back In Stock Notifier for WooCommerce] List recent back in stock productsOkay I see thank you
Forum: Plugins
In reply to: [Contact Form 7] Sendinblue boolean attribute field doesn’t send any value* TEST_BOOL (boolean)
* TEST_CAT (category)Forum: Plugins
In reply to: [Contact Form 7] Sendinblue boolean attribute field doesn’t send any value[text* your-firstname "skllslslk"] [email* your-email "[email protected]"] [checkbox* your-test_bool use_label_element "dsksdkldksl"] [select your-test_cat "some val" "another val"] [submit "Submit"]
- This reply was modified 3 years ago by phpbot.
Forum: Plugins
In reply to: [Contact Form 7] Sendinblue boolean attribute field doesn’t send any valueFor now, it’s just a local installation of https://localwp.com
However, just created a blank installation with CF7 and the only fields I was able to submit to SIB, were the email field and text fields. So, since it is a totally blank installation, it should be possible to reproduce that quite fast.
Using
select
in CF7 and acategory
field type in SIB doesn’t submit any value.The same goes for
checkbox
in CF7 andboolean
in SIB.These data types seem to be passed incorrectly, I guess?
Just to note, the API connection is set up successfully and submitting forms creates new contacts with the mentioned field values (email, text).
Also, field names are correctly prefixed with
your-
.Anything we can do to submit other data types through the corresponding form fields?
Forum: Plugins
In reply to: [Kadence WooCommerce Email Designer] Apply design to “Password Changed” emailHey Karla,
Okay okay I see the point.
Thanks for answering and explaing and providing ressources.