Merged in release/release-1.09 (pull request #10)
Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma
This commit is contained in:
committed by
Jay Sharma
parent
779393381f
commit
22f10a9edd
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
use Automattic\WooCommerce\Utilities\NumberUtil;
|
||||
use Automattic\WooCommerce\Utilities\StringUtil;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
@@ -256,7 +257,7 @@ class WC_Discounts {
|
||||
}
|
||||
|
||||
$coupon_code = $coupon->get_code();
|
||||
if ( ! isset( $this->discounts[ $coupon_code ] ) || ! is_array( $this->discounts[ $coupon_code ] ) ) {
|
||||
if ( StringUtil::is_null_or_whitespace( $this->discounts[ $coupon_code ] ?? null ) ) {
|
||||
$this->discounts[ $coupon_code ] = array_fill_keys( array_keys( $this->items ), 0 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user