Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Fatal error: integration with Facebook and Gift Cards (?) #495

Closed
MyjoyVera opened this issue Apr 21, 2020 · 2 comments
Closed

Fatal error: integration with Facebook and Gift Cards (?) #495

MyjoyVera opened this issue Apr 21, 2020 · 2 comments

Comments

@MyjoyVera
Copy link

Hi! Let's see if someone can help me, its the first time i write here and I have 0 idea of programing....

I'm using the PW Gift Card pluging in my store: myjoyvera.com
But as you can try yourself, when you try to add some of the gift cards into your basket ( https://myjoyvera.es/producto/tarjetas-regalo/tarjeta-de-regalo/)
It shows the following Fatal Error (see below),
I contacted the PW Gift Card team but they said me that the problem is the "woo-poly-integration" pluging, so this is why I ask here.

This is the error:


Fatal error: Uncaught ArgumentCountError: Too few arguments to function WC_Facebookcommerce_EventsTracker::set_last_product_added_to_cart_upon_redirect(), 1 passed in /homepages/36/d818141585/htdocs/app818141610/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /homepages/36/d818141585/htdocs/app818141610/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php:397 Stack trace: #0 /homepages/36/d818141585/htdocs/app818141610/wp-includes/class-wp-hook.php(287): WC_Facebookcommerce_EventsTracker->set_last_product_added_to_cart_upon_redirect('') #1 /homepages/36/d818141585/htdocs/app818141610/wp-includes/plugin.php(206): WP_Hook->apply_filters('', Array) #2 /homepages/36/d818141585/htdocs/app818141610/wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Cart.php(406): apply_filters('woocommerce_add...', '') #3 /homepages/36/d818141585/htdocs/app818141610/wp-includes/class-wp-hook.php(287): Hyyan\WPI\Cart->addToCartHandlerVariable('') #4 /homepages/36/d818141585/htdocs/app818141610/w in /homepages/36/d818141585/htdocs/app818141610/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php on line 397


I have no idea why, can you give me some solution?
thanks

@Jon007
Copy link
Contributor

Jon007 commented Jun 28, 2020

Hi, this plugin only provides a compatibility layer between the WooCommerce plugin itself and Polylang:

  • This plugin does not provide a compatibility layer between PW Gift Card and Polylang
  • This plugin does not provide a compatibility layer between WC_Facebookcommerce_EventsTracker and Polylang
  • This plugin does not provide a compatibility layer between WC_Facebookcommerce_EventsTracker and PW Gift Card

Also when raising an issue please provide all the information requested on the template.

However, looking at your error log there, I can confirm that I am about to remove the function where the error seems to be happening - Hyyan\WPI\Cart->addToCartHandlerVariable and have left some instructions for temporarily commenting it out on issue #502 please check that issue

@Jon007 Jon007 closed this as completed Jun 28, 2020
@Jon007
Copy link
Contributor

Jon007 commented Jun 28, 2020

noted that on https://wordpress.org/support/topic/error-when-i-add-the-product-to-the-cart-2/
additional information is provided showing that two arguments should now be passed to apply_filters( 'woocommerce_add_to_cart_redirect', $url, $adding_to_cart )
nonetheless removing the code may be an even better solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants