I think I’ve found a fix. I was able to reproduce the bug just like @stephen.loera – it happened whenever I created a new account during checkout. But I’ve managed to fix it on my own site.
I’ve submitted a pull request to the author of the plugin, so hopefully he’ll update it soon.
In the meantime, you can manually change your woocommerce-bulk-discount.php
to use this updated code for the action_after_calculate
function:
// 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;
}
}
Hope it helps!