SHARE
TWEET

Untitled

a guest Sep 19th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action( 'wp_footer', 'my_footer_js' );
  2. function my_footer_js() {
  3.     if(is_product()){
  4.     $product = wc_get_product( $post_id );
  5. ?>
  6. <script src="https://angus.finance-calculator.co.uk/js/imegaonestep.js"></script>
  7.  <script>
  8.  imegaCheckout.init({
  9.  priceElement:'.yourPriceElement',
  10.  apiKey:'ab49988ae4995727941d4b4c76127c86',
  11.  insertion:'after',
  12.  element:'#ds_div',
  13.  anchorTemplate:'simple',
  14.  vKey:'< YOUR VERIFICATION KEY >', //optional
  15.  margin:'20px 0', //optional
  16.  width:'360px', //optional,
  17.  amount:'<?php echo $product->get_price(); ?>', //optional,
  18.  image:'/images/products/product123.png' //optional
  19.  });
  20.  </script>
  21. <?php
  22. }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top