Skip to content

Instantly share code, notes, and snippets.

@colinhoward
Created December 18, 2014 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinhoward/25be5a6eca1e4b8b7db9 to your computer and use it in GitHub Desktop.
Save colinhoward/25be5a6eca1e4b8b7db9 to your computer and use it in GitHub Desktop.
WooCommerce <> HasOffers Integration
add_action( 'woocommerce_thankyou', 'my_custom_tracking' );
function my_custom_tracking( $order_id ) {
// Pull values from WooCommerce
$order = new WC_Order( $order_id );
$saleAmount = $order->get_total();
/**
<iframe src="https://demo.go2cloud.org/aff_l?offer_id=2&amount=$saleAmount&adv_sub=$order” scrolling="no" frameborder="0" width="1" height="1"></iframe>
**/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment