Get Started
FunnelKit Documentation
Get unstuck with our helpful reference material

One Click Upsells

Facebook For WooCommerce

If you are already using the "Facebook For WooCommerce" plugin for your Woocommerce store to track purchase events.

You will require to follow some simple steps to enable "Purchase Events" tracking using FunnelKit.

Follow these instructions:

Step 1: Disable the purchase event tracking

To disable Purchase Events tracking using the "Facebook For WooCommerce" plugin, copy the code snippet from below and paste it into your functions.php file:

/**
 * This snippet will stop purchase events to fire on thank you page
 **/
add_action( 'woocommerce_init', function () {

	//get all WooCommerce integrations
	$integrations = WC()->integrations->get_integrations();

	//checking if facebook for woocommerce installed?
	if ( isset( $integrations['facebookcommerce'] ) && $integrations['facebookcommerce'] instanceof WC_Facebookcommerce_Integration ) {

		/**
		 * For version < 1.1.0
		 */
		remove_action( 'woocommerce_thankyou', [
			$integrations['facebookcommerce']->events_tracker,
			'inject_gateway_purchase_event'
		], $integrations['facebookcommerce']->events_tracker::FB_PRIORITY_HIGH );

		/**
		 * For version >= 1.1.0
		 */
		remove_action( 'woocommerce_thankyou', [
			$integrations['facebookcommerce']->events_tracker,
			'inject_purchase_event'
		], 40 );
	}else{
		if ( function_exists('facebook_for_woocommerce') ) {
			$event_track = facebook_for_woocommerce()->get_integration()->events_tracker;


			/**
			 * For version >= 1.1.0
			 */
			remove_action( 'woocommerce_thankyou', [
				$event_track,
				'inject_purchase_event'
			], 40 );


			remove_action( 'woocommerce_checkout_update_order_meta', [
				$event_track,
				'inject_purchase_event'
			], 10 );
		}
	}
}, 999 );

Step 2: Go to FunnelKit Settings

Now navigate to FunnelKit > Settings > General > Facebook Pixel tab.

Go to FunnelKit Settings

Scroll down and click "Enable Purchase Event"

Enable purchase events

Once done, click on the "Save Changes" button.

Step 3: Ignore the warning message

All Done!! After making all changes, you can ignore the notification by clicking the "Ignore this message" link.

Ignore the warning message

That's done!

chevron-down