I wrote this function:
add_action( 'woocommerce_before_calculate_totals', 'adding_custom_price', 10, 1);
function adding_custom_price( $cart ) {
global $woocommerce;
foreach ( $cart->get_cart() as $cart_item ) {
//If there is minimum 1 coupon active
if (!empty(WC()->cart->applied_coupons)) {
}
//If there isn't any coupon in cart
else {
//Here I want to do some styling in CSS or run something in jQuery
}
}
}
I want to do some CSS in it and run some jQuery in the else, how can I do that?