php - WooCommerce coupon "forcing" -


right i'm applying 2 coupons programmatically this:

if (is_user_logged_in()) {             $user = wp_get_current_user();             foreach (array_intersect(array(                 'client',                 'administrator',                 'editor'             ), $user->roles) $role) {                 $woocommerce->cart->add_discount(sanitize_text_field('logged_in'));                 break;             }         } $number_products = $woocommerce->cart->cart_contents_count;         if ($number_products >= 3) {             $woocommerce->cart->add_discount(sanitize_text_field('more_then_3'));         } 

but when user adds coupon has option "check box if coupon cannot used in conjunction other coupons." doesn't allow me add these coupons anymore. need allow these 2 coupons available added. cannot uncheck option user added coupon because users available add alot of them , cannot allow. ideas how fix problem?

thanks help!


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -