Carl Brubaker
Forum Replies Created
-
@oluisrael @tychesoftwares When is this getting added to the plugin? It still isn’t there.
Thanks,
CarlForum: Plugins
In reply to: [WooCommerce Square] Get value of $this->get_api_id()Thanks, you don’t happen to know any developers that work on this that you could ask do you?
After some discussion with the support team, they are updating an action hook to include the
$order_id
and this is the resulting hook I came up with. This is mostly a modification of their code that I copied and pasted.add_action('orddd_after_timeslot_update', 'action_orddd_after_timeslot_update', 10, 2); /** * Sets _orddd_lite_timeslot_timestamp time zone to the time zone setting in the WordPress Admin * Settings instead of the default UTC-0. * @param string $time_slot Delivery time slot. * @param int $order_id Order ID to update post meta. */ function action_orddd_after_timeslot_update($time_slot, $order_id) { if (empty($time_slot) || !isset($_POST['h_deliverydate'])) { return; } $h_deliverydate = $_POST['h_deliverydate']; if (!in_array($time_slot, ['asap', 'choose', 'NA', 'select'], true)) { $order_time_slot = $time_slot; $time_format = get_option('orddd_lite_delivery_time_format'); $time_slot_arr = explode(' - ',$time_slot); $from_time = date('H:i',strtotime($time_slot_arr[0])); //phpcs:ignore $delivery_date = $h_deliverydate.' '.$from_time; $timestamp = new DateTime($delivery_date, new DateTimeZone(wp_timezone_string())); update_post_meta($order_id, '_orddd_lite_timeslot_timestamp', $timestamp->format('U')); } }
Thanks for the escalation. And no, the plugin does not currently consider WordPress Local Timezone when storing the time slot in the database. It always saves it as UTC 0.
Hi Patrick,
I changed the security settings on reCaptcha and added a honeypot and it does seem as though the spam has been greatly reduced. I used the same settings on a different plugin and both had the similar results. I like that Forminator has more free features and will continue to use.
Thanks,
CarlI see this was marked as resolved. I also see that the resolution was to stop using Forminator. I just started using forminator on a site and have noticed the same spamming. I have tried all the recaptcha options and turned up all of the security settings and they are still coming through. If the resolution is to use a different plugin then I will begin searching. I liked forminator otherwise.
Forum: Plugins
In reply to: [WooCommerce] WP5.9/WooCommerce defaulting to template-canvas.phpIgnore code above. Use this instead.
function action_remove_block_templates() { remove_theme_support('block-templates'); } add_action('after_setup_theme', 'action_remove_block_templates', 15); function filter_no_woocommerce_block_templates($has_template) { return false; } function filter_add_filter_no_woocommerce_block_templates($template) { add_filter('woocommerce_has_block_template', 'filter_no_woocommerce_block_templates', 10, 1); return $template; } add_filter('template_include', 'filter_add_filter_no_woocommerce_block_templates',10, 1);
Forum: Fixing WordPress
In reply to: WP5.9/WooCommerce defaulting to template-canvas.phpIgnore code above. This is the correct solution.
function action_remove_block_templates() { remove_theme_support('block-templates'); } add_action('after_setup_theme', 'action_remove_block_templates', 15); function filter_no_woocommerce_block_templates($has_template) { return false; } function filter_add_filter_no_woocommerce_block_templates($template) { add_filter('woocommerce_has_block_template', 'filter_no_woocommerce_block_templates', 10, 1); return $template; } add_filter('template_include', 'filter_add_filter_no_woocommerce_block_templates',10, 1);
Forum: Plugins
In reply to: [WooCommerce] WP5.9/WooCommerce defaulting to template-canvas.phpI found the proper filter to resolve the issue.
function filter_no_woocommerce_block_templates($has_template) { return false; } function action_add_filter_no_woocommerce_block_templates() { add_filter('woocommerce_has_block_template', 'filter_no_woocommerce_block_templates', 10, 1); } add_action('template_include', 'action_add_filter_no_woocommerce_block_templates');
Forum: Fixing WordPress
In reply to: WP5.9/WooCommerce defaulting to template-canvas.phpAfter some digging I found a solution.
function filter_no_woocommerce_block_templates($has_template) { return false; } function action_add_filter_no_woocommerce_block_templates() { add_filter('woocommerce_has_block_template', 'filter_no_woocommerce_block_templates', 10, 1); } add_action('template_include', 'action_add_filter_no_woocommerce_block_templates');
Forum: Plugins
In reply to: [WooCommerce] WP5.9/WooCommerce defaulting to template-canvas.phpYes, I understand that there is something in the theme that needs corrected. I was hoping for some insights into what I need to code to get it to not recognize the .html templates.
I will dig through the function more to see if I can figure out how to get it to return false.
Thanks
Forum: Plugins
In reply to: [WooCommerce] WP5.9/WooCommerce defaulting to template-canvas.phpUPDATE:
I have been digging through this and have found that
self::has_block_template( 'single-product' )
is returning true even though I am not using a block theme.file
includes/class-wc-template-loader.php
line 167.When I changed this to return
false
it rendered correctly.Forum: Developing with WordPress
In reply to: CPT and Taxonomy rewrite rules conflict.Oh, right (duh). Not sure why that didn’t make sense to me before I started this thread.
Forum: Developing with WordPress
In reply to: Permalink for CPT without taxonomyI got it figured out by modifying the code above to include this:
Register CPT excerpt:
'rewrite' => ['slug' => 'post-type/%sections%'] register_post_type('post-type', $args);
Register Taxonomy excerpt:
'rewrite' => ['slug' => 'post-type'] $post_types = ['post-type']; register_taxonomy('sections', $post_types, $args);
- This reply was modified 3 years, 9 months ago by Carl Brubaker.
Forum: Developing with WordPress
In reply to: ‘separate_items_with_commas’ not showing in UIWill do. I didn’t check the old editor.