Title: Plugin making call incorrectly
Last modified: December 3, 2023

---

# Plugin making call incorrectly

 *  Resolved [jonataslessa](https://wordpress.org/support/users/jonataslessa/)
 * (@jonataslessa)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/)
 * ![](https://i0.wp.com/davyjones.com.br/wp-content/uploads/2023/12/Screenshot-
   3.png?ssl=1)
 * Plugin is making call incorrectly.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249137)
 * Hello [@jonataslessa](https://wordpress.org/support/users/jonataslessa/),
   Thank
   you for reaching out!
 * > Plugin is making call incorrectly.
 * I can’t see this on my test site, not even one deprecation notice.
 * 
   Link to image: [https://d.pr/i/yx9zm9](https://d.pr/i/yx9zm9)Do you need to 
   be on a certain page/directory? It would be great if you could attach a copy 
   of your system status as well. You can find it via WooCommerce > Status. Select“
   Get system report” and then “Copy for support” (after you scroll down a bit)”.
   Once done, please paste it here in your reply or via a text-sharing service like
   [https://gist.github.com/](https://gist.github.com/).
 * Look forward to hearing back from you.
 *  Thread Starter [jonataslessa](https://wordpress.org/support/users/jonataslessa/)
 * (@jonataslessa)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249152)
 * I checked here, it was a function I had implemented to disable the pixel events
   of the “Facebook for WooCommerce” plugin, as I use another plugin for the Pixel,
   below is what I used, what is the best way to disable the pixel events of the“
   Facebook for WooCommerce” plugin?
 *     ```wp-block-code
       /**
        * 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 );
       ```
   
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249187)
 * Hi there
 * > I checked here, it was a function I had implemented to disable the pixel events
   > of the “Facebook for WooCommerce” plugin, as I use another plugin for the Pixel
 * Thank you for the update and for sharing the code you’ve used to disable the 
   pixel events.
 * > what is the best way to disable the pixel events of the “Facebook for WooCommerce”
   > plugin?
 * You can disable pixel events by using a filter provided by the plugin. Here’s
   a [code snippet](https://woo.com/document/facebook-for-woocommerce/#section-46)
   that you can add to your child theme’s functions.php file. Note that this will
   disable all pixel events for the “Facebook for WooCommerce” plugin. If you want
   to disable specific events only, you may need to use a different approach, which
   could involve custom coding.
 * Hope this helps.
 *  Thread Starter [jonataslessa](https://wordpress.org/support/users/jonataslessa/)
 * (@jonataslessa)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249220)
 * Solved, thank you
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249228)
 * > Solved, thank you
 * That’s great to hear! Thanks for letting us know.
 * Feel free to open a new topic if you have any other questions.
 * If you have a minute, we’d love it if you could leave us a review:
 * [https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)
 * All the best.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin making call incorrectly’ is closed to new replies.

 * ![](https://ps.w.org/facebook-for-woocommerce/assets/icon.svg?rev=3469606)
 * [Meta for WooCommerce](https://wordpress.org/plugins/facebook-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-making-call-incorrectly/#post-17249228)
 * Status: resolved