daymobrew
Forum Replies Created
-
This filter will work for me. I will change the ‘access’ array in my filter function.
I didn’t realise there were great docs for the plugin. I found a filter that I will try: https://www.wpdownloadmanager.com/doc/filter-reference/wpdm_before_download/
The plugin is probably compatible with HPOS because it does not work on orders (HPOS is only for orders).
Forum: Plugins
In reply to: [Smart Slider 3] Images not loading on simple slider (on one site)Thanks for the explanation and quick help.
Forum: Plugins
In reply to: [Smart Slider 3] Images not loading on simple slider (on one site)I fixed it. It seems that the Smart Slider JS files were injected in the middle of a html comment that happened to have ‘</head>’ it in! It looks like the 4 scripts are injected in an unusual way (instead of wp_enqueue_scripts).
I had code like this:
add_action('wp_head', 'gtm_code', 1); function gtm_code() { ?> .. gtm js code <!-- Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. --> ...more gtm js code. <?php }The 4 SS3 JS files were injected between
andand</head>in the comment!Why does SS3 not use wp_enqueue_scripts/wp_head?
Forum: Plugins
In reply to: [Preview E-mails for WooCommerce] Critical Error Previewing Any EmailsI’ve just encountered the same error. I have Custom Order Statuses for WooCommerce plugin and I have created some custom order statuses. The plugin seems to be abandoned but works fine.
Error:
PHP Fatal error: Uncaught Error: Call to undefined method WOOCOS_Email::trigger() in \wp-content\plugins\woo-preview-emails\includes\Main.php:315The plugin has the
WOOCOS_Emailclass (similar but different from WCOOS_Email).The plugin appears to use
woocos_trigger( $orderID, $current_order_status )to send its emails but $current_order_status seems to be an object from its options in wp_options.It would probably be messy to accommodate this.
I definitely second the “use a plugin” suggestion.
I wrote about creating a CF7DTX shortcode back in 2019 (it’s really just a regular shortcode). https://www.damiencarbery.com/2019/11/shortcode-for-contact-form-7-dynamic-text-extension/
Forum: Plugins
In reply to: [CMB2] file_list data not stored when WooCommerce HPOS activeI have changed the
new_cmb2_box()code:$woo_hpos_active = get_option( 'woocommerce_custom_orders_table_enabled' ); $object_types = ( 'yes' == $woo_hpos_active ) ? array( 'woocommerce_page_wc-orders' ) : array( 'shop_order' ); $cmb = new_cmb2_box( array( ... 'object_types' => $object_types, ... );- This reply was modified 2 years, 8 months ago by daymobrew.
Forum: Plugins
In reply to: [CMB2] file_list data not stored when WooCommerce HPOS activeI think I’ve figured out the issue:
If object_types is
shop_orderandwoocommerce_page_wc-ordersthen it will not work.'object_types' => array( 'shop_order', 'woocommerce_page_wc-orders' ),If it is only
woocommerce_page_wc-ordersthen it works fine.'object_types' => array( 'woocommerce_page_wc-orders' ),Maybe I can check whether HPOS is active and set the object_types list appropriately.
Forum: Plugins
In reply to: [CMB2] file_list data not stored when WooCommerce HPOS activeIt’s also strange that when debugging in VSC I added breakpoints at the top of CMB2_Woo_Orders_Hookup::hooks(), get_order_meta(), update_order_meta() and save_order_meta_changes(). These work on my ‘other‘ code but not on the attach-order-files-to-wc-order-email.php code (VSC marks them as Unverified Breakpoints!).
I even modified the latter code to change from a PHP class to straight functional code (like the working file) but no joy.
Forum: Plugins
In reply to: [CMB2] file_list data not stored when WooCommerce HPOS activeI noticed that when I put the
file_listfield in another meta box (one from the other support thread [though it is not in the linked file]) that it works. I’ll keep looking into this strangeness.Forum: Plugins
In reply to: [Custom Order Statuses for WooCommerce] Is this plugin still in development?I think that the developer is gone, even the website listed on the profile page is dead and the developer has not been active on wordpress.org in at least a year.
That said, the plugin still works for me on Woo 8.0.3 and WordPress 6.3.1.
First, the message is a ‘notice’ so not an error or even a warning. That said, the fix is trivial.
In custom-order-statuses-for-woocommerce/ajax/deactivation-form.php around line 30 change
$order->idto$order->get_id():array_push( $found_orders, $order->id )to
array_push( $found_orders, $order->get_id() );I am using it with WC 8.0.3 and WP 6.3.1 and it is working for me.
There is a small warning from WooCommerce but it’s trivial. (it has $order->id instead of $order->get_id() – I’m submitting a patch for that).
That did it. I got a fresh copy from
developbranch and the data is now loading and being stored inwp_wc_orders_metatable.View post on imgur.com
Thank you.
Should I mark this as resolved or wait until the branch is merged to main?