Created
July 19, 2018 15:31
-
-
Save NickGreen/588b04b3817c0ede18f06cb3e1382d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_footer','custom_jquery_add_to_cart_script'); | |
function custom_jquery_add_to_cart_script(){ | |
?> | |
<script type="text/javascript"> | |
// Ready state | |
(function($){ | |
$( document.body ).on( 'added_to_cart', function(){ | |
console.log('EVENT: added_to_cart'); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment