I have coupons where I have specified that a user can only use a coupon once and have noticed that whenever a customer places an order I get an error log entries:
PHP Warning: array_keys() expects parameter 1 to be array, boolean given in /wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 1499 … and line 1502.
PHP Warning: Illegal offset type in isset or empty in /wp-includes/meta.php on line 466.
Line 1493 of class-wc-cart.php reads:
$used_by = get_post_meta( $this->id, ‘_used_by’ );
I’m new to coding so forgive me if I’ve got this all wrong but this looks to me like its looking for the _used_by meta in the cart post rather than the coupon post.
Any help with this would be greatly appreciated.
- The topic ‘Coupon Usage Limits per User – error messages’ is closed to new replies.