Thread Starter
morysk
(@morysk)
Guten Abend Andreas,
ich habe das Problem vorläufig wie folgt gelöst:
Ich habe folgenden Code-Schnipsel bei der functions.php hinzugefügt:
add_action( ‘woocommerce_before_cart’, ‘apply_matched_coupons’ );
function apply_matched_coupons() {
global $woocommerce;
$coupon_code = ‘kostenfrei-moryskin’; // your coupon code here
if ( $woocommerce->cart->has_discount( $coupon_code ) ) return;
if ( $woocommerce->cart->cart_contents_total >= 9000 && $woocommerce->cart->cart_contents_total <=9002 ) {
$woocommerce->cart->add_discount( $coupon_code );
$woocommerce->show_messages();
}
}
Nun klappt alles, aber leider ist das keine perfekte Lösung.
Trotzdem vielen Dank
Mit besten Grüßen
Morysk