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
<?php | |
// Add function to fix some for the event tracking issues from the facebook for WooCommerce 1.7.5 update. | |
add_action( 'woocommerce_init', 'wc_facebook_tracking_fixes' ); | |
function wc_facebook_tracking_fixes(){ | |
// Get the facebook integration class. | |
$facebook = WooCommerce::instance()->integrations->get_integrations()['facebookcommerce']; | |
// Add add to cart event tracking to allow for WooCommerce redirect to cart after adding product. | |
add_action('woocommerce_after_cart', array($facebook->events_tracker, 'inject_add_to_cart_event')); | |
} |
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
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |