I have a plugin that sends an advocates referral coupon code to e-mails that they enter. When the audience receives this email I\'d like to create a flow where they can clic
add_action('woocommerce_before_cart', 'discount'); function discount( ) { global $woocommerce; $code= $_GET["code"]; if(!empty($code)){ if(WC()->session->set( 'applied_coupons', $code )){ echo 'Applied coupon!'; } } }