SHARE
TWEET

Untitled

a guest Sep 19th, 2019 86 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. ?>
  7. <script src="https://angus.finance-calculator.co.uk/js/imegaonestep.js"></script>
  8.  <script>
  9.  imegaCheckout.init({
  10.  priceElement:'.yourPriceElement',
  11.  apiKey:'ab49988ae4995727941d4b4c76127c86',
  12.  insertion:'after',
  13.  element:'#ds_div',
  14.  anchorTemplate:'simple',
  15.  vKey:'< YOUR VERIFICATION KEY >', //optional
  16.  margin:'20px 0', //optional
  17.  width:'360px', //optional,
  18.  amount:'<?php echo $product->get_price(); ?>', //optional,
  19.  image:'/images/products/product123.png' //optional
  20.  });
  21.  </script>
  22. <?php
  23. }
  24. }
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