Created
March 21, 2017 20:27
-
-
Save brandalismo/dd9dddc411ad6941c1b7c3c8e0ff74e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* REALIZAR SEGUIMIENTO DE CONVERSIONES DE FACEBOOK | |
*/ | |
function woo_facebook_pixel_tracking( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$order_total = $order->get_total(); | |
?> | |
<script>fbq('track', 'Purchase', {'value':'<?php echo $order_total ?>','currency':'EUR'});</script> | |
<?php | |
} | |
add_action( 'woocommerce_thankyou', 'woo_facebook_pixel_tracking' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment