Stripe payment successful but order not marked as paid
-
Hi,
I have the WooCommerce Stripe Gateway installed, fully connected and Stripe is accepting payments (I see the payment made in Stripe anb I receive success emails about payments made)… but WooCommerce does not mark the order as paid.
I see the following notice/error in WooCommerce logs.
Would anyone please know what is causing the error and how to solve this?
2022-12-08T15:30:23+00:00 CRITICAL Uncaught Error: Attempt to modify property "data" on null in /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php:848 Stack trace: #0 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php(990): WC_Stripe_Webhook_Handler->process_payment_intent_success(Object(stdClass)) #1 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php(70): WC_Stripe_Webhook_Handler->process_webhook('{\n "id": "evt_...') #2 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(308): WC_Stripe_Webhook_Handler->check_for_webhook('') #3 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #4 /www/doc/www.mydomain.com/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce/includes/class-wc-api.php(161): do_action('woocommerce_api...') #6 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(308): WC_API->handle_api_requests(Object(WP)) #7 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #8 /www/doc/www.mydomain.com/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #9 /www/doc/www.mydomain.com/www/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array) #10 /www/doc/www.mydomain.com/www/wp-includes/class-wp.php(780): WP->parse_request('') #11 /www/doc/www.mydomain.com/www/wp-includes/functions.php(1332): WP->main('') #12 /www/doc/www.mydomain.com/www/wp-blog-header.php(16): wp() #13 /www/doc/www.mydomain.com/www/index.php(17): require('/www/doc/www.ja...') #14 {main} thrown v /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php on line 848
Would anyone know what is causing this?
In iThemes Security, I have REST API set to Restricted Access and disapled XML-RPC.
I am running this on WordPress 6.1.1 and WoCommerce 7.1.1 and WooCommerce Stripe Gateway 7.0.1
-
Hi there @prwordpressorg ??
Stripe payment successful but order not marked as paid
Thanks for reaching out, let’s figure out why things are not lining up!
First-up, feel free to check out the troubleshooting tips listed in the plugin’s documentation.
In iThemes Security, I have REST API set to Restricted Access and disapled XML-RPC.
I am running this on WordPress 6.1.1 and WoCommerce 7.1.1 and WooCommerce Stripe Gateway 7.0.1
In order to have a better understanding of the store’s set up, could you please share its URL and a copy of its System Status? You can find it via
WooCommerce > Status
. SelectGet system report
and then click theCopy for support
button.?You can either paste it in your response here, or use https://pastebin.com/ for pasting it there and sharing it with us.Also, could you please navigate to
WooCommerce > Status > Logs
and from the dropdown on the right side, please see if there are any logs starting with the words fatal-error.If so, please select
View
and copy and paste them into your reply here.Looking forward to hearing from you!
Thanks for your fast reply.
a. The log details are already posted in the question above.
b. Which part of the WooCommerce status report do you want to see? I am not comfortable posting it as a whole publicly.
Here is some of it:
### WordPress Environment ### WordPress address (URL): https://www.mydomain.com Site address (URL): https://www.mydomain.com WC Version: 7.1.1 REST API Version: ? 7.1.1 WC Blocks Version: ? 8.7.6 Action Scheduler Version: ? 3.5.3 Log Directory Writable: ? WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.1.12 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 5000 cURL Version: 7.74.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 10.3.36-MariaDB-0+deb10u2-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 7.1.1 WC Database Prefix: xxxxxxxxx_ Total Database Size: 74.00MB Database Data Size: 61.19MB Database Index Size: 12.81MB ### Security ### Secure connection (HTTPS): ? ### Settings ### API Enabled: – Force SSL: – Currency: XX Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) ### Templates ### Archive Template: Your theme has a woocommerce.php file you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues. ### Action Scheduler ### Complete: 262 Oldest: 2022-11-30 16:28:55 +0100 Newest: 2022-12-08 18:04:07 +0100 Pending: 1 Oldest: 2022-12-09 15:57:40 +0100 Newest: 2022-12-09 15:57:40 +0100 ### Status report information ### Generated at: 2022-12-08 18:06:02 +01:00
Thanks for sharing your System Status Report, however, this is incomplete.
If you’re uncomfortable sending your data on a public forum, I recommend sending it using a service like https://pastebin.com/ then you can allow some days for the info to be alive while the issue is being checked. (Once the info is removed or deactivated from Pastebin, this will not be accessible).
Additionally, please provide a screenshot of the Order Notes as well.
If you don’t already have a screenshot service installed, you can try https://snipboard.io or https://skitch.com/. You can share the direct link to the image as a response to this topic.
Thanks!
Hi,
the WooCommerce setup details are: https://pastebin.com/0BpnfEnx
The Order details are: https://snipboard.io/YAKDJb.jpg
And just to reiterate: The order is accepted by WooCommrce, Stripe accepts the payment… but then WooCommerce does not (for reasons in the error code above) accept the “paid” information from Stripe and thus never marks the order as complete (even though it has been paid.)
Thanks for looking into this.
Hello,
Please make sure your webhooks are properly set, you can refer to this documentation:
https://woocommerce.com/document/stripe/#webhooksYou can then create a test order to see if the issue persists.
If that does not help. Can you please switch your theme to Storefront, disable all plugins except WooCommerce and Stripe Payment Gateway? Then you can try again to make a test order, see if the issue persists.
You can make a test using a staging environment this will help to do not touch the live site, we recommend WP Staging for quickly spinning up a new test site.
You can use the Meks Quick Plugin Disabler to help you remember what plugins you currently have active so it’s easy to switch them back on. Link: https://www.ads-software.com/plugins/meks-quick-plugin-disabler/
If the issue is not present at this point, it means another plugin or a theme is affecting the normal behavior, you will need to perform a conflict test to identify the cause of the issue.
From the WooCommerce Stripe settings
“Payments: Enabled
Payouts: Enabled
Webhooks: Enabled
The most recent live webhook, timestamped 2022-12-10 12:53:29 UTC, was processed successfully.”Could one of your support team members who can read code actually look at the error code above (initial request) and perhaps say in one line “The error says that X cannot access Y becuase of Z).
Than would be of great help in searching for the cause of the problem.
After further testing:
When I enable the TEST mode, with payment through WooCommerce Stripe Gateway, the payment goes through fine, Stripe gets/accepts the payment, sends the confirmation webhook and my site accepts the webhook, marking the order as completed.
However, when I switch over to LIVE mode, the the payment goes through fine, Stripe gets the payment, sends the webhook… but my site does NOT accept the webhook.
When I look into the status of webhooks in Stripe associacted with the problematic LIVE payment, I see:
charge.suceeded: Response 200 OK Request { "id": "evt_xxxxredacted-for-securityxxxx", "object": "event", "api_version": "2022-11-15", "created": 1670682299, "data": { "object": { "id": "ch_xxxxredacted-for-securityxxxx", "object": "charge", "amount": 1000, "amount_captured": 1000, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "xxxxredacted-for-securityxxxx", "billing_details": { "address": { "city": "xxxxredacted-for-securityxxxx", "country": "xxxxredacted-for-securityxxxx", "line1": "xxxxredacted-for-securityxxxx", "line2": null, "postal_code": "xxxxredacted-for-securityxxxx", "state": null }, "email": "xxxxredacted-for-securityxxxx", "name": "xxxxredacted-for-securityxxxx", "phone": "xxxxredacted-for-securityxxxx" }, "calculated_statement_descriptor": "xxxxredacted-for-securityxxxx", "captured": true, "created": 1670682297, "currency": "czk", "customer": "cus_xxxxredacted-for-securityxxxx", "description": "xxxxredacted-for-securityxxxx", "destination": null, "dispute": null, "disputed": false, "failure_balance_transaction": null, "failure_code": null, "failure_message": null, "fraud_details": { }, "invoice": null, "livemode": true, "metadata": { "parent_order": "1", "site_url": "https://www.mysite.com", "customer_email": "xxxxredacted-for-securityxxxx", "customer_name": "xxxxredacted-for-securityxxxx", "order_id": "7139", "payment_via": "SUMO Subscriptions", "payment_type": "recurring", "save_payment_method": "true" }, "on_behalf_of": null, "order": null, "outcome": { "network_status": "approved_by_network", "reason": null, "risk_level": "normal", "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, "payment_intent": "pi_xxxxredacted-for-securityxxxx", "payment_method": "src_xxxxredacted-for-securityxxxx", "payment_method_details": { "card": { "brand": "mastercard", "checks": { "address_line1_check": "unavailable", "address_postal_code_check": "unavailable", "cvc_check": "pass" }, "country": "xxxxredacted-for-securityxxxx", "exp_month": xxxxredacted-for-securityxxxx, "exp_year": xxxxredacted-for-securityxxxx, "fingerprint": "xxxxredacted-for-securityxxxx", "funding": "credit", "installments": null, "last4": "xxxxredacted-for-securityxxxx", "mandate": null, "network": "mastercard", "three_d_secure": { "authentication_flow": "challenge", "result": "authenticated", "result_reason": null, "version": "2.1.0" }, "wallet": null }, "type": "card" }, "receipt_email": null, "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/payment/xxxxredacted-for-securityxxxx", "refunded": false, "review": null, "shipping": null, "source": { "id": "src_xxxxredacted-for-securityxxxx", "object": "source", "amount": 1000, "client_secret": "src_client_secret_xxxxredacted-for-securityxxxx", "created": 1670682299, "currency": "czk", "flow": "redirect", "livemode": true, "metadata": { }, "owner": { "address": { "city": "xxxxredacted-for-securityxxxx", "country": "xxxxredacted-for-securityxxxx", "line1": "xxxxredacted-for-securityxxxx", "line2": null, "postal_code": "xxxxredacted-for-securityxxxx", "state": null }, "email": "xxxxredacted-for-securityxxxx", "name": "xxxxredacted-for-securityxxxx", "phone": "xxxxredacted-for-securityxxxx", "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redirect": { "url": "stripejs://use_stripe_sdk", "return_url": "stripejs://use_stripe_sdk/return_url", "status": "not_required" }, "statement_descriptor": null, "status": "consumed", "three_d_secure": { "brand": "xxxxredacted-for-securityxxxx", "card": "xxxxredacted-for-securityxxxx", "card_automatically_updated": null, "country": "CZ", "cvc_check": "pass", "exp_month": xxxxredacted-for-securityxxxx, "exp_year": xxxxredacted-for-securityxxxx, "fingerprint": "xxxxredacted-for-securityxxxx", "funding": "credit", "last4": "xxxxredacted-for-securityxxxx", "three_d_secure": "optional", "iin": null, "authenticated": true }, "type": "three_d_secure", "usage": "single_use" }, "source_transfer": null, "statement_descriptor": "xxxxredacted-for-securityxxxx", "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } }, "livemode": true, "pending_webhooks": 2, "request": { "id": null, "idempotency_key": "pi_xxxxredacted-for-securityxxxx" }, "type": "charge.succeeded" } So this is OK. But the payment_intent.succeeded throws an error: Response { "code": "internal_server_error", "message": "<p>There was a critical error on your site.</p><p><a href="https://www.ads-software.com/support/article/faq-troubleshooting/">Further information about solving problems with WordPress.</a></p>", "data": { "status": 500 }, "additional_errors": [ ] } Request { "id": "evt_xxxxredacted-for-securityxxxx", "object": "event", "api_version": "2022-11-15", "created": 1670682299, "data": { "object": { "id": "xxxxredacted-for-securityxxxx", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, "amount_details": { "tip": { } }, "amount_received": 1000, "application": null, "application_fee_amount": null, "automatic_payment_methods": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "xxxxredacted-for-securityxxxx", "confirmation_method": "automatic", "created": 1670682270, "currency": "czk", "customer": "cus_xxxxredacted-for-securityxxxx", "description": "xxxxredacted-for-securityxxxx", "invoice": null, "last_payment_error": null, "livemode": true, "metadata": { "parent_order": "1", "site_url": "https://mydomain.com", "customer_email": "xxxxredacted-for-securityxxxx", "customer_name": "xxxxredacted-for-securityxxxx", "order_id": "7139", "payment_via": "SUMO Subscriptions", "payment_type": "recurring", "save_payment_method": "true" }, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": "off_session", "shipping": null, "source": "src_xxxxredacted-for-securityxxxx", "statement_descriptor": "xxxxredacted-for-securityxxxx", "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null, "latest_charge": "ch_xxxxredacted-for-securityxxxx" } }, "livemode": true, "pending_webhooks": 2, "request": { "id": null, "idempotency_key": "xxxxredacted-for-securityxxxx" }, "type": "payment_intent.succeeded" }
During this time, however, the site was fully functional.
I have repeated the attempt/live payment several times during the day, always double-checking that the site is OK, it always is… and the same happens: When in TEST mode, the payment through WooCommerce Stripe Gateway works fine.
But when in LIVE mode, the webhook is sent by Stripe, but not accepted.
Can anyone see what else to troubleshoot please? I have ripped all my hair out already…
-
This reply was modified 2 years, 3 months ago by
Steven Stern (sterndata).
For complete information, I have the following settings in iThemes security:
yes Protect System Files: Prevent public access to readme.html, readme.txt, wp-config.php, install.php, wp-includes, and .htaccess.
yes Disable Directory Browsing
yes Disable PHP in Uploads
yes Disable PHP in Plugins
yes Disable PHP in ThemesAPI access
Disable XML-RPC
REST API restricted accessFile permissions:
root 755
wp-includes 775
wp-admin 775
wp-admin/js 775
wp-content 775
wp-content/themes 775
wp-content/plugins 775
wp-content/uploads 755
wp-config.php 644
.htaccess 644On further investigation, I turned wp-congif to debug and found the following lines of code…
[10-Dec-2022 17:51:42 UTC] PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-content/plugins/better-wp-security/core/core.php on line 1102 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 7022 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 2162 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 7022 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 2162 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Cookie/Jar.php on line 63 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Cookie/Jar.php on line 73 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Cookie/Jar.php on line 89 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Cookie/Jar.php on line 102 [10-Dec-2022 17:51:42 UTC] PHP Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Cookie/Jar.php on line 111 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-content/plugins/better-wp-security/core/core.php on line 1102 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 7022 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 2162 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82 [10-Dec-2022 17:51:43 UTC] PHP Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/doc/www.mydomain.com/www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91 [10-Dec-2022 17:51:44 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 7022 [10-Dec-2022 17:51:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/doc/www.mydomain.com/www/wp-includes/functions.php on line 2162
Can somebody please see what I am not seeing?
Hello @prwordpressorg,
On further investigation, I turned wp-congif to debug and found the following lines of code…
Thank you for sharing the logs but they don’t seem related to the problem.
Have you tried downgrading to a lower version of
PHP
?If that doesn’t take care of it, please perform the conflict test mentioned above as we are not aware of iThemes settings.
You can do so by:
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Let us know how it goes!
Hi, thanks for all the suggestions.
After further debugging, I have narrowed the issue down to the following:
When looking into the WooCommerce error log, I see the following notice…
2022-12-11T22:29:39+00:00 CRITICAL Uncaught Error: Attempt to modify property "data" on null in /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php:848 Stack trace: #0 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php(990): WC_Stripe_Webhook_Handler->process_payment_intent_success(Object(stdClass)) #1 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php(70): WC_Stripe_Webhook_Handler->process_webhook('{\n "id": "evt_...') #2 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(308): WC_Stripe_Webhook_Handler->check_for_webhook('') #3 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #4 /www/doc/www.mydomain.com/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce/includes/class-wc-api.php(161): do_action('woocommerce_api...') #6 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(308): WC_API->handle_api_requests(Object(WP)) #7 /www/doc/www.mydomain.com/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #8 /www/doc/www.mydomain.com/www/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #9 /www/doc/www.mydomain.com/www/wp-includes/class-wp.php(399): do_action_ref_array('parse_request', Array) #10 /www/doc/www.mydomain.com/www/wp-includes/class-wp.php(780): WP->parse_request('') #11 /www/doc/www.mydomain.com/www/wp-includes/functions.php(1332): WP->main('') #12 /www/doc/www.mydomain.com/www/wp-blog-header.php(16): wp() #13 /www/doc/www.mydomain.com/www/index.php(17): require('/www/doc/mydomain...') #14 {main} thrown v /www/doc/www.mydomain.com/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-webhook-handler.php on line 848
So the issue is with WC_Stripe_Webhook_Handler (woocommerce-gateway-stripe) and the line 848 in class-wc-stripe-webhook-handler.php is
$charge = end( $intent->charges->data );
The setting of this line is marked yellow on this screenshot: https://snipboard.io/XTagHM.jpg
I am however not sure of the function of this line, would anyone please have an idea? Thanks.
-
This reply was modified 2 years, 3 months ago by
prwordpressorg.
Thanks for sending the error logs.
Just to confirm, have you tried switching the default Storefront theme and only WooCommerce and Stripe plugins are enabled and see if it resolves the issue?
Otherwise, please proceed with the full conflict test as suggested above for us to isolate if your theme or any third-party plugins present on your site is causing the issue here.
To reiterate, I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.
If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.
Let us know how it goes!
I have the exact same problem.
@prwordpressorg did you find a solution?
Hello @brianandersen,
I understand you have the same problem but we need to handle each request individually in forums.
Please open your own thread and make sure to include as much information as you can.
Thank you!
Exact same error message here
CRITICAL Uncaught Error: Attempt to modify property “data” on null
Happen on 25% of our orders with stripe since 1 month now.
(Webhook say 25% errors on stripe.com)
-
This reply was modified 2 years, 3 months ago by
- The topic ‘Stripe payment successful but order not marked as paid’ is closed to new replies.