• dutt

    (@rajat-dutt)


    hi
    thanks for this plugin.it is working great but just like others i am also facing discount removing problem.In last discussion problem i have seen code but after implement it i got fatal error.
    // line 437
    public function action_after_calculate( WC_Cart $cart ) {
    if ( $this->coupon_check() ) {
    return;
    }
    if ( !$this->bulk_discount_calculated) {
    return;
    }
    if ( sizeof( $cart->cart_contents ) > 0 ) {
    foreach ( $cart->cart_contents as $cart_item_key => $values ) {
    $_product = $values[‘data’];
    if ( get_post_meta( $_product->id, “_bulkdiscount_enabled”, true ) != ” && get_post_meta( $_product->id, “_bulkdiscount_enabled”, true ) !== ‘yes’ ) {
    continue;
    }
    $values[‘data’]->set_price( $this->discount_coeffs[$this->get_actual_id( $_product )][‘orig_price’] );
    }
    $this->bulk_discount_calculated = false;
    }
    }
    i do not know how to implement this code.
    please tell me how to implement it or please update the plugin

    https://www.ads-software.com/plugins/woocommerce-bulk-discount/

  • The topic ‘woocommerce bulk discount’ is closed to new replies.