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

[3.2.0] All payments/gateways using SV framework fail, "Cannot access protected property" $customer_id #8369

Closed
shaunkuschel opened this issue Feb 23, 2022 · 3 comments · Fixed by #8371
Labels
priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. type: bug The issue is a confirmed bug.

Comments

@shaunkuschel
Copy link

Describe the bug

Since version 3.2.0 was released, any payment gateway that uses SV's framework is failing to process any payments due to the following error:

2022-02-23T16:38:21+00:00 CRITICAL Uncaught Error: Cannot access protected property Automattic\WooCommerce\Admin\Overrides\Order::$customer_id in /.../html/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php:1671
Stack trace:
#0 /.../html/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php(550): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway->get_order(Object(Automattic\WooCommerce\Admin\Overrides\Order))
#1 /.../html/wp-content/plugins/woocommerce-square/includes/Gateway.php(264): SkyVerge\WooCommerce\PluginFramework\v5_4_0\SV_WC_Payment_Gateway_Direct->get_order(16024)
#2 /.../html/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gate in /.../html/wp-content/plugins/woocommerce-square/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php on line 1671

The error above is specifically related to Square, however, this is happening on sites that have the WooCommerce Admin plugin (version 3.2.0) active, as well as any gateway using the SV framework (Square, PPBT, Authorize.Net, etc).

From what we've been able to find thus far, we suspect that this may be related to this PR:

59c3883#diff-4f4ffc2a47984c09fa78d890645b72869d0652ef4c63074bd5c29934eeaa12b2

The Checkout page may also experience an issue, as seen here:

Markup 2022-02-23 at 15 21 24

The current workaround (that appears to be working) is to deactivate the WooCommerce Admin plugin (as we have confirmed successful payments being made after that).

To Reproduce

  1. Activate WC Admin 3.2.0 and a gateway with the SV framework (Square, PPBT, Auth.Net, etc)
  2. Attempt to process a payment
  3. Payment will fail due to a fatal error

Actual behavior:

Payments are failing with new orders and subscriptions, when being processed while version 3.2.0 of the WooCommerce Admin plugin is active on the site.

Expected behavior

Payments should process successfully.

Additional context

We've received quite a few reports of this from customers:

4806629-zen
4806408-zen
2261145-hc

@shaunkuschel shaunkuschel added type: bug The issue is a confirmed bug. priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. labels Feb 23, 2022
@thracefulton
Copy link

I was able to work with the merchant in 10731830-hc to confirm that disabling/removing WC Admin allowed them to take payments successfully again.

Recommended the same to 4807107-zen.

@NathalyaVides
Copy link

reported here 4807301-zen (from 34352415-hc): disabling WC Admin fixed the problem.

@AbhinavSakalle
Copy link

AbhinavSakalle commented Feb 24, 2022

Reported in 34353689-HC. We were able to fix this by disabling WooCommerce Admin. The merchant confirmed by placing a test order that went through fine. Advised to update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: critical The issue is critical—e.g. a fatal error, security problem affecting many customers. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants