Major conflict with WooCommerce Order Status Manager
-
Hi there,
I love this plugin, it’s easy to use and the emails you can create look so amazing compared to the standard WooCoomerce ones.
However, I discovered that there is a major conflict between this plugin and WooCommerce Order Status Manager, which means that the custom emails that the Status Manager allows you to set up will not work – they will trigger an error instead of being sent and they also won’t show up in the email list (under WooCommerce > Settings) any longer.
It is a real shame and it seams to be quite a big conflict, but perhaps this can be resolved?
The page I need help with: [log in to see the link]
-
Hey,
Thanks for posting.
I don’t have a copy of that plugin or access to it as it’s not on www.ads-software.com
If I had to guess it sounds like the plugins emails are missing the @email object in the do_action ‘woocommerce_email_header’. This has been something that other plugins were also missing. You can see it here in the Woocommerce emails:
So my first guess would be for you to check the email templates in the plugin files and make sure everywhere that ‘woocommerce_email_header’ is called includes the $email_header and $email variables.
Let me know what you find.
Ben
Hi Ben,
thanks for your fast response!
The WooCommerce Order Status Extension by Skyverge uses the following email template:
<?php /** * WooCommerce Order Status Manager * * This source file is subject to the GNU General Public License v3.0 * that is bundled with this package in the file license.txt. * It is also available through the world-wide-web at this URL: * https://www.gnu.org/licenses/gpl-3.0.html * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade WooCommerce Order Status Manager to newer * versions in the future. If you wish to customize WooCommerce Order Status Manager for your * needs please refer to https://docs.woocommerce.com/document/woocommerce-order-status-manager/ for more information. * * @package WC-Order-Status-Manager/Templates * @author SkyVerge * @copyright Copyright (c) 2015-2018, SkyVerge, Inc. * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 */ defined( 'ABSPATH' ) or exit; /** * Default customer order status email template. * * Note: the .td class used in table is from WooCommerce core (see email-styles.php). * * @type string $email_heading The email heading. * @type string $email_body_text The email body. * @type \WC_Order $order The order object. * @type bool $sent_to_admin Whether email is sent to admin. * @type bool $plain_text Whether email is plain text. * @type bool $show_download_links Whether to show download links. * @type bool $show_purchase_note Whether to show purchase note. * @type \WC_Email $email The email object. * * @since 1.0.0 * @version 1.7.0 */ ?> <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?> <?php if ( $email_body_text ) : ?> <div id="body_text"><?php echo $email_body_text; ?></div> <?php endif; ?> <?php do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?> <h2><?php echo esc_html__( 'Order:', 'woocommerce-order-status-manager' ) . ' ' . $order->get_order_number(); ?></h2> <table class="td" cellspacing="0" cellpadding="6" style="width: 100%;" border="1"> <thead> <tr> <th class="td" scope="col" style="text-align: left;"><?php esc_html_e( 'Product', 'woocommerce-order-status-manager' ); ?></th> <th class="td" scope="col" style="text-align: left;"><?php esc_html_e( 'Quantity', 'woocommerce-order-status-manager' ); ?></th> <th class="td" scope="col" style="text-align: left;"><?php esc_html_e( 'Price', 'woocommerce-order-status-manager' ); ?></th> </tr> </thead> <tbody> <?php $email_order_items = array( 'show_purchase_note' => $show_purchase_note, 'show_download_links' => $show_download_links, 'show_sku' => false, ); echo SV_WC_Plugin_Compatibility::is_wc_version_gte_3_0() ? wc_get_email_order_items( $order, $email_order_items ) : $order->email_order_items_table( $email_order_items ); ?> </tbody> <tfoot> <?php if ( $totals = $order->get_order_item_totals() ) { $i = 0; foreach ( $totals as $total ) { $i++; ?> <tr> <th class="td" scope="row" colspan="2" style="text-align: left; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th> <td class="td" style="text-align: left; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td> </tr><?php } } ?> </tfoot> </table> <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?> <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?> <h2><?php esc_html_e( 'Customer details', 'woocommerce-order-status-manager' ); ?></h2> <?php if ( $billing_email = SV_WC_Order_Compatibility::get_prop( $order, 'billing_email' ) ) : ?> <p><strong><?php esc_html_e( 'Email:', 'woocommerce-order-status-manager' ); ?></strong> <?php echo $billing_email; ?></p> <?php endif; ?> <?php if ( $billing_phone = SV_WC_Order_Compatibility::get_prop( $order, 'billing_phone' ) ) : ?> <p><strong><?php esc_html_e( 'Tel:', 'woocommerce-order-status-manager' ); ?></strong> <?php echo $billing_phone; ?></p> <?php endif; ?> <?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?> <?php do_action( 'woocommerce_email_footer', $email ); ?>
To me it looks like it does contain the correct @email object in the do_action ‘woocommerce_email_header’?
Yes it sure does, so that was my guess. At this point, you need to go look in your php error logs and find what the error is that is causing the issue.
Again if this was a free plugin I would be happy to troubleshoot but I have no access.
Ben
I believe I found some fatal error logs that are relevant for this.
When I had the Kadence WooCommerce Email Designer activated, I always got an error when I tried to send a custom order email (that email is set up through the WooCommerce Order Status Extension):2018-12-06T08:23:55+00:00 CRITICAL Uncaught Error: Call to a member function trigger() on null in /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce-order-status-manager/includes/admin/class-wc-order-status-manager-admin-orders.php:158 Stack trace: #0 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Order_Status_Manager_Admin_Orders->send_custom_order_email(Object(WC_Order)) #1 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(136): do_action('woocommerce_ord...', Object(WC_Order)) #4 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Meta_Box_Order_Actions::save(227190, Object(WP_Post)) #5 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hoo 2018-12-06T08:27:15+00:00 CRITICAL Uncaught Error: Call to a member function trigger() on null in /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce-order-status-manager/includes/admin/class-wc-order-status-manager-admin-orders.php:158 Stack trace: #0 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Order_Status_Manager_Admin_Orders->send_custom_order_email(Object(WC_Order)) #1 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(136): do_action('woocommerce_ord...', Object(WC_Order)) #4 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Meta_Box_Order_Actions::save(227190, Object(WP_Post)) #5 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hoo 2018-12-06T08:27:33+00:00 CRITICAL Uncaught Error: Call to a member function trigger() on null in /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce-order-status-manager/includes/admin/class-wc-order-status-manager-admin-orders.php:158 Stack trace: #0 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Order_Status_Manager_Admin_Orders->send_custom_order_email(Object(WC_Order)) #1 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /chroot/home/adcb2147/fairyloot.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(136): do_action('woocommerce_ord...', Object(WC_Order)) #4 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(286): WC_Meta_Box_Order_Actions::save(227190, Object(WP_Post)) #5 /chroot/home/adcb2147/fairyloot.com/html/wp-includes/class-wp-hook.php(310): WP_Hoo
Does that give you any hint of what might be conflicting with the two plugins?
Yes that is helpful. I think I have it, I’ll try and update in the next 24 hours with a fix.
Ben
OMG, that would be amazing! ??
I also use Woocommerce Order Status Manager and I have seen that with the new Kadence Email Designer update, you have solved it, many thanks!!! ??
Glad to hear it!
Ben
Woohooo, thanks so much for the fast fix!
I too have both Kadence WooCommerce Email Designer and Woocommerce Order Status Manager, but my custom status emails don’t show up in your plugin. Is this correct? Does Kadence WooCommerce Email Designer not support custom emails, but only WC default emails? Or do I miss something?
- This reply was modified 5 years, 9 months ago by argosmedia.
Hello,
Please start a new topic for all support queries. Thanks! What is the current version of kadence email designer that you’re using on your site?
-Kevin
but my custom status emails don’t show up in your plugin. Is this correct?
Yes, This plugins email styles will still affect those emails. So your styling still stays consistent.
But the email settings themselves (body, header etc) are controlled in that plugin and not accessible through the Customizer.
For the sake of Previewing them perhaps there could be a way in the future to do that through our plugin which I can look into.
Ben
Great, thanks guys. I preview for custom (status) emails would be very useful.
We have the same issue order status manager had a recent update. It broke out site.
Hey @noidcustommobile what error did you get? How do I recreate so I can see?
Ben
- The topic ‘Major conflict with WooCommerce Order Status Manager’ is closed to new replies.