Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error after trying to remove a product from the cart #468

Closed
krzysztoffinelf opened this issue Oct 5, 2024 · 1 comment
Closed

Comments

@krzysztoffinelf
Copy link

Describe the bug:

When I try to remove a product with a variant I get an error with code 500

Steps to reproduce:

  1. I am adding a product with a variant
  2. I'm going to the card
  3. I'm trying to remove a product

Expected behavior:

Removing a product from the cart

Actual behavior:

Returning error 500 in network for endpoint cart/?remove_item=269ebf0392cab08f87cb0599f3ed8db3&_wpnonce=21e62b00fe

Additional details:

Fatal error: Uncaught TypeError: SkyVerge\WooCommerce\Google_Analytics_Pro\Helpers\Product_Helper::get_product_variation_attributes(): Argument #2 ($variation_attributes) must be of type array, string given, called in /wp-content/plugins/woocommerce-google-analytics-pro/src/API/Universal_Analytics/Measurement_Protocol_API/Request.php on line 276 and defined in /wp-content/plugins/woocommerce-google-analytics-pro/src/Helpers/Product_Helper.php:162 Stack trace: #0 /wp-content/plugins/woocommerce-google-analytics-pro/src/API/Universal_Analytics/Measurement_Protocol_API/Request.php(276): SkyVerge\WooCommerce\Google_Analytics_Pro\Helpers\Product_Helper::get_product_variation_attributes() #1 /wp-content/plugins/woocommerce-google-analytics-pro/src/API/Universal_Analytics/Measurement_Protocol_API.php(147): SkyVerge\WooCommerce\Google_Analytics_Pro\API\Universal_Analytics\Measurement_Protocol_API\Request->track_ec_remove_from_cart() #2 /wp-content/plugins/woocommerce-google-analytics-pro/src/Tracking/Event_Tracking.php(413): SkyVerge\WooCommerce\Google_Analytics_Pro\API\Universal_Analytics\Measurement_Protocol_API->track_event() #3 /wp-content/plugins/woocommerce-google-analytics-pro/src/Tracking/Events/Universal_Analytics_Event.php(52): SkyVerge\WooCommerce\Google_Analytics_Pro\Tracking\Event_Tracking->api_record_event() #4 /wp-content/plugins/woocommerce-google-analytics-pro/src/Tracking/Events/Universal_Analytics/Removed_From_Cart_Event.php(96): SkyVerge\WooCommerce\Google_Analytics_Pro\Tracking\Events\Universal_Analytics_Event->record_via_api() #5 /wp-includes/class-wp-hook.php(326): SkyVerge\WooCommerce\Google_Analytics_Pro\Tracking\Events\Universal_Analytics\Removed_From_Cart_Event->track() #6 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /wp-includes/plugin.php(517): WP_Hook->do_action() #8 /wp-content/plugins/woocommerce/includes/class-wc-cart.php(1312): do_action() #9 /wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(636): WC_Cart->remove_cart_item() #10 /wp-includes/class-wp-hook.php(324): WC_Form_Handler::update_cart_action() #11 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /wp-includes/plugin.php(517): WP_Hook->do_action() #13 /wp-settings.php(722): do_action() #14 /wp-config.php(108): require_once('...') #15 /wp-load.php(50): require_once('/home/...') #16 /wp-blog-header.php(13): require_once('/home/...') #17 /index.php(17): require('/home/...') #18 {main} thrown in /wp-content/plugins/woocommerce-google-analytics-pro/src/Helpers/Product_Helper.php on line 162

@tomalec
Copy link
Member

tomalec commented Oct 5, 2024

Hi @krzysztoffinelf ,
Thanks for the report, but from the error details you shared, it looks like the problem is with the WooCommerce Google Analytics Pro - paid extension by SkyVerge

This repo is for the free extension by WooCommerce.

Therefore, I'd recommend contacting SkyVerge support.
If you experience problems with our extension, please feel free to reopen. Then I'd recommend deactivating possibly all other extensions and checking if the problem still persists with just Google Analytics Integration running.

@tomalec tomalec closed this as completed Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants