woocommerce/assets
kolyasapphire fe3395cd6b Add 'applied_coupon' trigger to checkout.js
To check it’s working correctly:

add_action( 'woocommerce_after_checkout_form', 'alert_on_coupon');
add_action( 'woocommerce_after_cart', 'alert_on_coupon');

function alert_on_coupon() { ?>
<script type="text/javascript">
	jQuery(document).ready(function($) {
    $( document.body ).on( 'applied_coupon', function(event,code){
    	alert(code);
    });
});

$( document.body ).trigger( 'applied_coupon', [ data.coupon_code ] );
2019-08-14 19:09:18 +03:00
..
css Merge pull request #23067 from woocommerce/pr/23043 2019-07-12 12:40:53 -03:00
fonts images, svgs optim 2018-10-04 11:57:05 +02:00
images OBW: Add wc-admin to recommended page 2019-07-03 13:02:07 +12:00
js Add 'applied_coupon' trigger to checkout.js 2019-08-14 19:09:18 +03:00