• 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.

    • This topic was modified 7 years, 3 months ago by araundu.
  • The topic ‘Fix for this plugin’ is closed to new replies.