In class-dm-apply-order-discount.php change init function to
public function init() {
if (get_post_type() == “shop_order”) {
add_action(‘add_meta_boxes’, array($this, ‘add_apply_discount_container’));
add_action(‘admin_enqueue_scripts’, array($this, ‘enqueue_scripts’));
}
}
to disable the WC_Order call when post is not an order.
]]>[07-Apr-2017 18:19:17 UTC] PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid order.’ in /wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:86
Stack trace:
#0 /wp-content/plugins/woocommerce/includes/class-wc-data-store.php(143): Abstract_WC_Order_Data_Store_CPT->read(Object(WC_Order))
#1 /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(109): WC_Data_Store->read(Object(WC_Order))
#2 /wp-content/plugins/woo-discount-admin-backoffice/includes/class-dm-apply-order-discount.php(31): WC_Abstract_Order->__construct(2948)
#3 [internal function]: DM_Apply_Order_Discount->add_apply_discount_container(‘post’)
#4 /wp-includes/class-wp-hook.php(300): call_user in /wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php on line 86
]]>We really enjoy this plugin for our newer order takers, makes giving our contractors discount via phone calls easy and quick. However since the new update it conflicts with being able to edit products when activated. Is this by chance going to be looked at or are we back to the good ol’ fashion calculator?
Thank you
]]>We really enjoy this plugin for our newer order takers, makes giving our contractors discount via phone calls easy and quick. However since the new update it conflicts with being able to edit products when activated. Is this by chance going to be looked at or are we back to the good ol’ fashion calculator?
Thank you
]]>Hey guys,
I would like to get the “Apply discount to all items” value.
Something like var_dump($tehDiscountinPercent)
should work.
Does anyone know how to do this?
]]>