Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //BUY NOW confirmation JS
- function print_my_secondline_script() {
- if ( is_product()) {
- ?>
- <script type="text/javascript">
- jQuery('.single_add_to_cart_button.button').click(function() {
- var c = confirm("Click OK to continue?");
- return c; //you can just return c because it will be true or false
- });
- </script>
- <?php
- }
- }
- add_action( 'wp_footer', 'print_my_secondline_script' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement