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

Version:2.4.2,error report #1899

Closed
tangqinglong opened this issue Dec 10, 2023 · 1 comment
Closed

Version:2.4.2,error report #1899

tangqinglong opened this issue Dec 10, 2023 · 1 comment
Labels
support Support case

Comments

@tangqinglong
Copy link

Describe the Bug

Version:2.4.2
The error code is as follows:
Warning: Undefined array key "context" in /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-blocks/src/PayPalPaymentMethod.php on line 239

Fatal error: Uncaught TypeError: WooCommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus::is_smart_button_enabled_for_location(): Argument #1 ($location) must be of type string, null given, called in /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-blocks/src/PayPalPaymentMethod.php on line 239 and defined in /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php:87 Stack trace: #0 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-blocks/src/PayPalPaymentMethod.php(239): WooCommerce\PayPalCommerce\WcGateway\Helper\SettingsStatus->is_smart_button_enabled_for_location() #1 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Payments/PaymentMethodRegistry.php(62): WooCommerce\PayPalCommerce\Blocks\PayPalPaymentMethod->get_payment_method_data() #2 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Payments/Api.php(92): Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry->get_all_registered_script_data() #3 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Payments\Api->add_payment_method_script_data() #4 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #5 /www/wwwroot/fashionshell.net/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/MiniCart.php(201): do_action() #7 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php(100): Automattic\WooCommerce\Blocks\BlockTypes\MiniCart->enqueue_data() #8 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_editor_assets() #9 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #10 /www/wwwroot/fashionshell.net/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php(129): do_action() #12 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Admin\Features\ProductBlockEditor\Init->enqueue_styles() #13 /www/wwwroot/fashionshell.net/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #14 /www/wwwroot/fashionshell.net/wp-includes/plugin.php(517): WP_Hook->do_action() #15 /www/wwwroot/fashionshell.net/wp-admin/admin-header.php(118): do_action() #16 /www/wwwroot/fashionshell.net/wp-admin/admin.php(239): require_once('...') #17 {main} thrown in /www/wwwroot/fashionshell.net/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php on line 87
There has been a critical error on this website. Please check your site admin email inbox for instructions.

To Reproduce

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to …'
  4. See error

Screenshots

Expected Behavior

Actual Behavior

Environment

  • WordPress Version
  • WooCommerce Version
  • Plugin Version
  • Browser [e.g. Chrome, Safari] and Version
  • Any other plugins installed

Additional Details

System status
<!--If applicable, paste the system status here. Please ensure you redact or remove any identifying information. -->
@Sirvijver Sirvijver added the support Support case label Dec 11, 2023
@Sirvijver
Copy link
Collaborator

Hello @tangqinglong,

You have reached out to open GitHub forum with a support request. We utilize GitHub mainly for development activities, so I would like to ask you to reach out to the support team directly for more guidance.

I did take a minute to trace this error, and it seems the function that causes this error, checks whether smart buttons are enabled for a given location. It looks like a parameter that is required for this function is altered and does not allow the code to perform its function.

My guess would be that another plugin or the theme is causing this conflict, and would advise you to perform a full conflict test to rule out eventual issues with the theme or a different plugin. We recommend temporarily activating the default theme Storefront and disabling all other plugins except for WooCommerce and PayPal Payments to see if the behavior persists. Here's a guide that explains the steps in more detail: How to test for conflicts.

If this does not help you find the cause of the issue, please open a support thread as advised above.

Kind regards,
Joost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support case
Projects
None yet
Development

No branches or pull requests

2 participants