Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'wp_footer', 'my_footer_js' );
- function my_footer_js() {
- if(is_product()){
- $product = wc_get_product( $post_id );
- ?>
- <script src="https://angus.finance-calculator.co.uk/js/imegaonestep.js"></script>
- <script>
- imegaCheckout.init({
- priceElement:'.yourPriceElement',
- apiKey:'ab49988ae4995727941d4b4c76127c86',
- insertion:'after',
- element:'#ds_div',
- anchorTemplate:'simple',
- vKey:'< YOUR VERIFICATION KEY >', //optional
- margin:'20px 0', //optional
- width:'360px', //optional,
- amount:'<?php echo $product->get_price(); ?>', //optional,
- image:'/images/products/product123.png' //optional
- });
- </script>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement