Customer is sent to home page when cancelling payment
-
I noticed that my Woocommerce checkout process does not return the customer to the checkout page after a payment is cancelled, instead he is redirected to the home page.
Specifics: I use a WordPress site with woocommerce where a customer can pay with Paypal, creditcard etc. Both Paypal and my creditcard setup require the website to redirect to an external site to do the payment and when the payment is complete, the customer is directed back to the order-received page. This is all working fine.
But if the customer on the external site (Paypal.com for example) decides to hit the “cancel payment” he arrives back to the home page with a URL like this: https://example.com/?cancel_order=true&order=wc_order_oEYInB5bC3mCo&order_id=225487&redirect&_wpnonce=99cfb8ef9f
I checked my site with all plugins disabled and default theme and the same thing happens. It seems to be part of Woocommerce standard setup. How can it be changed?
The page I need help with: [log in to see the link]
-
Hello @jkocken!
I noticed that my Woocommerce checkout process does not return the customer to the checkout page after a payment is cancelled, instead he is redirected to the home page.
I was able to replicate the issues with your Credit/Debit card payment option. See a screenshot here.
To have further insight into the issue, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.
We will be waiting for your response!
Thanks for your fast reply. The problem is also with Paypal. Not only with my creditcard payment solution (PensoPay) which made me think this is a more general issue.
Here my status report (I did not update to the latest wordpress because one plugin I use is not yet compatible with wordpress 6.0. I tried but had to revert the changes.)
### WordPress Environment ### WordPress address (URL): https://newerapub.com Site address (URL): https://newerapub.com WC Version: 6.5.1 REST API Version: ? 6.5.1 WC Blocks Version: ? 7.4.3 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: ? 5.8.4 - There is a newer version of WordPress available (6.0) WP Multisite: – WP Memory Limit: 5 GB WP Debug Mode: – WP Cron: – Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.29 PHP Post Max Size: 5 GB PHP Time Limit: 1000 PHP Max Input Vars: 5000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.7.37-40-log Max Upload Size: 5 GB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.3.1 WC Database Prefix: wp_ Total Database Size: 1503.26MB Database Data Size: 1045.15MB Database Index Size: 458.11MB wp_woocommerce_sessions: Data: 1.33MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 1.52MB + Index: 0.36MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 7.52MB + Index: 8.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.47MB + Index: 0.70MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.38MB + Index: 0.30MB + Engine InnoDB wp_aff_affiliates: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wp_aff_affiliates_users: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_aff_hits: Data: 6.52MB + Index: 16.13MB + Engine InnoDB wp_aff_referrals: Data: 0.11MB + Index: 0.14MB + Engine InnoDB wp_aff_referral_items: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_aff_robots: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_aff_uris: Data: 2.52MB + Index: 1.73MB + Engine InnoDB wp_aff_user_agents: Data: 2.52MB + Index: 1.52MB + Engine InnoDB wp_ahm_assets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ahm_asset_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_ahm_download_stats: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_ahm_emails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ahm_sessions: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wp_ahm_social_conns: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ahm_user_download_counts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_alm: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cli_cookie_scan: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cli_cookie_scan_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_cli_cookie_scan_cookies: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_cli_cookie_scan_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cli_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 5.52MB + Index: 7.03MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB wp_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_e_submissions: Data: 2.52MB + Index: 3.36MB + Engine InnoDB wp_e_submissions_actions_log: Data: 1.52MB + Index: 1.69MB + Engine InnoDB wp_e_submissions_values: Data: 5.52MB + Index: 6.03MB + Engine InnoDB wp_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_languages_translations: Data: 0.20MB + Index: 0.13MB + Engine InnoDB wp_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_mo_files_domains: Data: 0.19MB + Index: 0.08MB + Engine InnoDB wp_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_strings: Data: 33.56MB + Index: 37.16MB + Engine InnoDB wp_icl_string_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_string_packages: Data: 0.20MB + Index: 0.00MB + Engine InnoDB wp_icl_string_pages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_icl_string_positions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_string_translations: Data: 56.58MB + Index: 24.06MB + Engine InnoDB wp_icl_string_urls: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_icl_translate: Data: 147.63MB + Index: 11.55MB + Engine InnoDB wp_icl_translate_job: Data: 1.52MB + Index: 0.38MB + Engine InnoDB wp_icl_translations: Data: 7.52MB + Index: 23.09MB + Engine InnoDB wp_icl_translation_batches: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_downloads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_icl_translation_status: Data: 127.58MB + Index: 1.52MB + Engine InnoDB wp_itsec_bans: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_dashboard_events: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_itsec_distributed_storage: Data: 13.52MB + Index: 0.02MB + Engine InnoDB wp_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_itsec_logs: Data: 2.52MB + Index: 0.53MB + Engine InnoDB wp_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 18.52MB + Index: 2.81MB + Engine InnoDB wp_postmeta: Data: 461.81MB + Index: 215.66MB + Engine InnoDB wp_posts: Data: 63.58MB + Index: 25.13MB + Engine InnoDB wp_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_analytics_gsc: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_rank_math_analytics_objects: Data: 0.42MB + Index: 0.20MB + Engine InnoDB wp_rank_math_internal_links: Data: 1.52MB + Index: 1.52MB + Engine InnoDB wp_rank_math_internal_meta: Data: 0.31MB + Index: 0.00MB + Engine InnoDB wp_rank_math_redirections: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_rank_math_redirections_cache: Data: 2.52MB + Index: 1.52MB + Engine InnoDB wp_rtk_basics: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rtk_users: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_sdm_downloads: Data: 0.38MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.25MB + Index: 0.36MB + Engine InnoDB wp_terms: Data: 0.19MB + Index: 0.25MB + Engine InnoDB wp_term_relationships: Data: 11.55MB + Index: 11.52MB + Engine InnoDB wp_term_taxonomy: Data: 0.23MB + Index: 0.25MB + Engine InnoDB wp_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_uap_action_log: Data: 0.14MB + Index: 0.31MB + Engine InnoDB wp_uap_action_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp_uap_action_log_meta: Data: 4.52MB + Index: 1.22MB + Engine InnoDB wp_uap_closure_log: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_uap_closure_log_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_uap_recipe_log: Data: 0.11MB + Index: 0.19MB + Engine InnoDB wp_uap_recipe_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp_uap_trigger_log: Data: 0.13MB + Index: 0.31MB + Engine InnoDB wp_uap_trigger_logs_view: Data: 0.00MB + Index: 0.00MB + Engine wp_uap_trigger_log_meta: Data: 10.52MB + Index: 9.58MB + Engine InnoDB wp_usermeta: Data: 17.55MB + Index: 20.06MB + Engine InnoDB wp_users: Data: 1.52MB + Index: 0.73MB + Engine InnoDB wp_wcpdf_invoice_number: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wcs_payment_retries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 1.52MB + Index: 0.69MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 1.52MB + Index: 1.08MB + Engine InnoDB wp_wc_order_stats: Data: 1.52MB + Index: 0.64MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 7.52MB + Index: 12.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woobe_history: Data: 3.52MB + Index: 4.52MB + Engine InnoDB wp_woobe_history_bulk: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wp_yith_wcaf_affiliates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_clicks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_commissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_commission_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payment_commission: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yith_wcaf_payment_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### astra-advanced-hook: 2 attachment: 21375 cartflows_flow: 1 cartflows_step: 2 cookielawinfo: 39 custom_css: 1 customize_changeset: 3 e-landing-page: 13 elementor_font: 22 elementor_lead: 24366 elementor_library: 438 elementor_snippet: 6 envato_kits: 19 frm_form_actions: 2 frm_styles: 1 itsec-dash-card: 10 itsec-dashboard: 2 nav_menu_item: 995 oembed_cache: 291 page: 440 post: 7 product: 5159 product_variation: 48062 revision: 5110 sdm_downloads: 25 shop_coupon: 22 shop_order: 6359 shop_order_refund: 29 shop_subscription: 22 stm-zoom-webinar: 1 uo-action: 31 uo-recipe: 24 uo-trigger: 34 vterminal_payment: 201 wpdmpro: 45 wpgae_click_event: 1 yith_wc_qof_1: 2 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (38) ### WPML Multilingual CMS: by OnTheGoSystems – 4.5.7 Advanced Custom Fields: by Delicious Brains – 5.12.2 Affiliates WooCommerce Light: by itthinx – 1.14.0 Affiliates: by itthinx – 4.13.0 iThemes Security: by iThemes – 8.1.2 PublishPress Capabilities: by PublishPress – 2.4.1 GDPR Cookie Consent: by WebToffee – 2.1.1 Download Manager: by W3 Eden Inc. – 3.2.41 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.4 Google Tag Manager for WordPress: by Thomas Geiger – 1.15.1 Easy WP SMTP: by wpecommerce alexanderfoxc – 1.4.7 Elementor Pro: by Elementor.com – 3.7.1 Elementor: by Elementor.com – 3.6.5 Folders: by Premio – 2.7.5 Health Check & Troubleshooting: by The www.ads-software.com community – 1.4.5 Sendy Elements: by Jose Sotelo – 2.0.0 Lenix Elementor Leads addon: by Lenix – 1.8.2 Loco Translate: by Tim Whitlock – 2.6.2 Members: by MemberPress – 3.2.1 PDF viewer for Elementor: by RedLettuce Plugins – 2.9.3 Really Simple SSL: by Really Simple Plugins – 5.3.2 Rank Math SEO: by Rank Math – 1.0.89.1 Show Variations For Woocommerce: by FLINIMI – 1.6 Tawk.to Live Chat: by Tawkto – 0.7.2 Trustpilot-reviews: by Trustpilot – 2.5.901 User Menus: by Code Atlantic – 1.2.9 User Switching: by John Blackbourn & contributors – 1.5.8 WooCommerce PensoPay: by PensoPay – 6.2.2 BEAR – Bulk Editor and Products Manager Professional for WooCommerce: by realmag777 – 2.1.1 WooCommerce Multilingual & Multicurrency: by OnTheGoSystems – 5.0.0 WooCommerce Name Your Price: by Kathy Darling – 3.3.9 WooCommerce Shortcodes: by WooThemes Claudio Sanches – 1.0.0 WooCommerce Subscriptions: by WooCommerce – 4.3.0 WooCommerce: by Automattic – 6.5.1 Asset CleanUp: Page Speed Booster: by Gabe Livan – 1.3.8.5 WP Fastest Cache: by Emre Vona – 1.0.1 WPML Media: by OnTheGoSystems – 2.7.0 WPML String Translation: by OnTheGoSystems – 3.2.1 ### Inactive Plugins (3) ### Astra Pro: by Brainstorm Force – 3.4.2 W3 Total Cache: by BoldGrid – 2.2.1 YITH Infinite Scrolling: by YITH – 1.7.0 ### Must Use Plugins (1) ### Health Check Troubleshooting Mode: by – 1.7.2 ### Settings ### API Enabled: – Force SSL: – Currency: DKK (DKK) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ? Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #167410 - /shop/ Cart: ? Page not set Checkout: #168 - /checkout/ My account: #169 - /my-account/ Terms and conditions: #1957 - /footer/terms-conditions/ ### Theme ### Name: ErhvervsHjemmesider Child Version: 1.0 Author URL: https://erhvervshjemmesider.dk/ Child Theme: ? Parent Theme Name: Astra Parent Theme Version: 3.8.1 Parent Theme Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme WooCommerce Support: ? ### Templates ### Overrides: erhvervshjemmesider-child/woocommerce/cart/cart-empty.php erhvervshjemmesider-child/woocommerce/cart/cart-item-data.php erhvervshjemmesider-child/woocommerce/cart/cart-shipping.php erhvervshjemmesider-child/woocommerce/cart/cart-totals.php erhvervshjemmesider-child/woocommerce/cart/cart.php erhvervshjemmesider-child/woocommerce/cart/cross-sells.php erhvervshjemmesider-child/woocommerce/cart/proceed-to-checkout-button.php erhvervshjemmesider-child/woocommerce/cart/shipping-calculator.php erhvervshjemmesider-child/woocommerce/checkout/cart-errors.php erhvervshjemmesider-child/woocommerce/checkout/form-billing.php erhvervshjemmesider-child/woocommerce/checkout/form-checkout.php erhvervshjemmesider-child/woocommerce/checkout/form-coupon.php erhvervshjemmesider-child/woocommerce/checkout/form-login.php erhvervshjemmesider-child/woocommerce/checkout/form-shipping.php erhvervshjemmesider-child/woocommerce/checkout/order-receipt.php erhvervshjemmesider-child/woocommerce/checkout/payment-method.php erhvervshjemmesider-child/woocommerce/checkout/payment.php erhvervshjemmesider-child/woocommerce/checkout/review-order.php erhvervshjemmesider-child/woocommerce/checkout/terms.php erhvervshjemmesider-child/woocommerce/checkout/thankyou.php erhvervshjemmesider-child/woocommerce/emails/admin-new-order.php erhvervshjemmesider-child/woocommerce/emails/email-addresses.php erhvervshjemmesider-child/woocommerce/emails/email-order-details.php erhvervshjemmesider-child/woocommerce/myaccount/dashboard.php erhvervshjemmesider-child/woocommerce/myaccount/form-login.php ### Subscriptions ### WCS_DEBUG: ? No Subscriptions Mode: ? Live Subscriptions Live URL: https://newerapub.com Subscriptions Template Theme Overrides: erhvervshjemmesider-child/woocommerce/emails/email-order-details.php Subscription Statuses: wc-pending: 8 wc-cancelled: 14 WooCommerce Account Connected: ? Yes Active Product Key: ? Yes Custom Retry Rules: ? No Custom Retry Rule Class: ? No Custom Raw Retry Rule: ? No Custom Retry Rule: ? No Retries Migration Status: ? Completed Report Cache Enabled: ? Yes Cache Update Failures: ? 0 failure ### Store Setup ### Country / State: Denmark ### Subscriptions by Payment Gateway ### PensoPay: wc-cancelled: 14 wc-pending: 8 ### Payment Gateway Support ### PensoPay: subscriptions products subscription_cancellation subscription_reactivation subscription_suspension subscription_amount_changes subscription_date_changes subscription_payment_method_change_admin subscription_payment_method_change_customer refunds multiple_subscriptions pre-orders PayPal Standard: subscriptions gateway_scheduled_payments subscription_payment_method_change_customer subscription_cancellation subscription_suspension subscription_reactivation products refunds PayPal Reference Transactions Enabled: ? No Direct bank transfer: products PensoPay - MobilePay: products refunds ### Action Scheduler ### Complete: 1,526 Oldest: 2022-04-26 16:11:44 +0200 Newest: 2022-05-27 15:42:13 +0200 Pending: 2 Oldest: 2022-05-31 19:01:24 +0200 Newest: 2022-05-31 19:01:24 +0200 ### Name Your Price ### Version: Template overrides: – ### Status report information ### Generated at: 2022-05-27 15:43:23 +02:00
Hi @jkocken ,
Thank you for providing your System status.
I have gone through your checkout process, and am able to replicate the issue at hand: https://snipboard.io/LTmx9D.jpg
I was, however, unable to replicate this issue on my test site, using Storefront theme, and Paypal, as it directs me back to the checkout page once canceling the payment.
As a first step, please could you flush your permalinks by navigating to Dashboard > Settings > Permalinks and resave your existing settings.
Additionally, please could you have a look at your Checkout Endpoints by navigating to WooCommerce > Settings > Advanced and compare it to the screenshot below:
https://snipboard.io/hoZbI2.jpg
Please let me know the outcome!
Hello @jkocken!
WC Database Version: 6.3.1
If the issue remains after following @roxannestoltz suggestions then please make sure to update your WooCommerce database.
It is recommended to have the same version as WooCommerce.You can update the database from the “WooCommerce → Status → Tools → Update database” area.
Hope it helps.
Thanks for your reply and instructions. @shaonback2 I flushed the permalinks, Deleted the cache and minified files (just in case) and checked that the endpoints are exactly as in your screenshots. This was fine.
I tried the abort payment again but it continues to send me back to the homepage.@shaonback2 I updated my Woocommerce database (now version 6.5.1 per the status report) and again cleared cache and tried once more. Still the same error occurs.
And just for good measure I disabled all plugins again except woocommerce, turned to a default theme and the error is still persisting….
Any other suggestions of what could be the problem?
Hi @jkocken ,
Thanks for the update!
Please try the following php and see if this works for you!
add_action('woocommerce_cancelled_order','lenura_redirect_to_home'); function lenura_redirect_to_home() { wp_redirect(home_url()); // REDIRECT PATH }
You need to add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme.
Let me know how this goes!
Thanks for the code snippet! I added the snippet to the functions.php of my child theme. But the snippet directs to the home_url. I need it to go to checkout page. (it DOES work but doesnt arrive to the right page).
I tried replacing (home_url()) with (checkout_url()) but that didn’t work… Sorry my coding skills are not that good. How to send them back to checkout?
Hi @jkocken
Try replacing the wp_redirect with the following:
wp_redirect( home_url( '/checkout/' ) );
YES! This works. Thank you so much!
Just one question, the original return link contains a lot of parameters, these are lost with the code snippet you gave me. I am not sure if they are important… the original URL is something like:
I don’t know if it matters…
Hi @jkocken ,
You are very welcome ?? Glad to hear it works!
To answer your question, no, this makes no difference, that would be expected behavior.
Best,
Perfect! Thanks for your assistance.
Hi @jkocken ,
Glad the issue is sorted!
Please would you mark this topic as resolved in the sidebar if you feel this issue has been resolved adequately?
Thanks!
- The topic ‘Customer is sent to home page when cancelling payment’ is closed to new replies.