Woocommerce 4.7 – Checkout breaks when payment method is removed
-
After updating to Woocommerce 4.7 we noticed that when trying to submit an order in checkout the error message would appear “Error processing checkout. Please try again.” with no further information in any error logs, even with Query monitor turned on.
To the customer it appears the order has not gone through, however in the admin the order is present with a ‘processing’ tag. No emails are sent.
Rolling back to the previous version fixed the issue and I did some testing on a local site to debug.It appears connected to a snippet we use to remove the payment method from the checkout. (our customers don’t pay until after delivery costs have been confirmed, so we don’t need payment at checkout). When the snippet is present (the payment method removed), the error appears. This occurs even when woocommerce 4.7 is the only plugin active, and using the twenty twenty theme.
As an alternative, I’ve tried unticking all payment methods in the admin, however it results in the error ‘invalid payment method’ instead.In testing, I have also used an alternative snippet – both succeed in hiding the payment methods, but result in the above-mentioned error when checking out.
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
function filter_woocommerce_cart_needs_payment( $this_total_0, $instance ) { $this_total_0 = ''; return $this_total_0; } add_filter( 'woocommerce_cart_needs_payment', 'filter_woocommerce_cart_needs_payment', 10, 2 );
Is this a bug or did something get deprecated to cause this? we can’t update our live site until this is fixed.
Woocommerce Status report (from local site)
### WordPress Environment ### WordPress address (URL): https://ozsaddle-stage-apache.local Site address (URL): https://ozsaddle-stage-apache.local WC Version: 4.7.0 REST API Version: ? 4.7.0 WC Blocks Version: ? 3.6.0 Action Scheduler Version: ? 3.1.6 WC Admin Version: ? Inactive 1.6.3 Log Directory Writable: ? WP Version: 5.5.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: en_AU External object cache: – ### Server Environment ### Server Info: Apache/2.4.43 (Unix) PHP Version: 7.4.1 PHP Post Max Size: 1,000 MB PHP Time Limit: 1200 PHP Max Input Vars: 4000 cURL Version: 7.54.0 LibreSSL/2.6.5 SUHOSIN Installed: – MySQL Version: 5.7.28 Max Upload Size: 300 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 4.7.0 WC Database Prefix: wp_ Total Database Size: 26.10MB Database Data Size: 15.15MB Database Index Size: 10.95MB wp_woocommerce_sessions: Data: 0.02MB + 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: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.13MB + Index: 0.14MB + 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.02MB + Index: 0.11MB + 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.02MB + Index: 0.03MB + Engine InnoDB wp_aws_cache: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_aws_index: Data: 2.48MB + Index: 0.89MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_gf_entry: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_entry_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_gf_entry_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gf_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gf_form_view: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_nextend2_image_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_nextend2_section_storage: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_nextend2_smartslider3_generators: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_nextend2_smartslider3_sliders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_nextend2_smartslider3_sliders_xref: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_nextend2_smartslider3_slides: Data: 0.05MB + Index: 0.14MB + Engine InnoDB wp_options: Data: 2.02MB + Index: 0.16MB + Engine InnoDB wp_postmeta: Data: 4.52MB + Index: 5.84MB + Engine InnoDB wp_posts: Data: 2.50MB + Index: 0.47MB + Engine InnoDB wp_termmeta: Data: 0.09MB + Index: 0.13MB + Engine InnoDB wp_terms: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wp_term_relationships: Data: 0.25MB + Index: 0.20MB + Engine InnoDB wp_term_taxonomy: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_usermeta: Data: 0.03MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + 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: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.19MB + Index: 0.31MB + 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_yoast_indexable: Data: 1.48MB + Index: 0.91MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.08MB + Index: 0.08MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 0.08MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### acf-field: 13 acf-field-group: 4 attachment: 429 custom_css: 1 customize_changeset: 3 nav_menu_item: 56 oembed_cache: 7 page: 31 popup_theme: 8 post: 26 product: 499 product_variation: 1023 revision: 201 shop_order: 99 wbcr-snippets: 24 ### Security ### Secure connection (HTTPS): ? Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ? ### Active Plugins (20) ### Query Monitor: by John Blackbourn – 3.6.5 Redux: by Redux.io + Dovy Paukstys – 4.1.23 Accordion Blocks: by Phil Buchanan – 1.1.6 Advanced Custom Fields PRO: by Elliot Condon – 5.9.3 Disable WooCommerce Admin: by – 1.0 – Installed version not tested with active version of WooCommerce 4.7.0 Login/Signup Popup ( Inline Form + Woocommerce ): by XootiX – 2.1 – Installed version not tested with active version of WooCommerce 4.7.0 Heartbeat Control by WP Rocket: by WP Rocket – 2.0 Oz Saddle Tools: by WP Butler – 1.0.0 Popup Maker: by Popup Maker – 1.13.1 Lazy Load - Optimize Images: by WP Rocket – 2.3.4 Smart Slider 3: by Nextend – 3.4.1.13 Smart Variations Images for WooCommerce: by David Rosendo – 4.0.76 – Installed version not tested with active version of WooCommerce 4.7.0 Storefront Pro: by pootlepress – 5.13.0 User Role Editor: by Vladimir Garagulya – 4.57 WooCommerce Brands: by WooCommerce – 1.6.17 – Installed version not tested with active version of WooCommerce 4.7.0 WooCommerce RRP: by Bradley Davis – 1.7.5 – Installed version not tested with active version of WooCommerce 4.7.0 WooCommerce: by Automattic – 4.7.0 Yoast SEO: by Team Yoast – 15.3 WP Rollback: by impress.org – 1.7.1 WPB Product Slider for WooCommerce: by wpbean – 2.0.8.7 – Installed version not tested with active version of WooCommerce 4.7.0 ### Inactive Plugins (12) ### Advanced noCaptcha & invisible Captcha: by Shamim Hasan – 6.1.5 – Installed version not tested with active version of WooCommerce 4.7.0 Advanced Woo Search: by ILLID – 2.15 – Installed version not tested with active version of WooCommerce 4.7.0 Autoptimize: by Frank Goossens (futtta) – 2.7.8 CAOS: by Daan van den Bergh – 3.7.7 Easy Username Updater: by Yogesh C. Pant – 1.0.4 Easy WP SMTP: by wpecommerce alexanderfoxc – 1.4.1 Gravity Forms: by Gravity Forms – 2.4.18 Woody ad snippets (PHP snippets | Insert PHP): by Will Bontrager Software LLC <[email protected]> Webcraftic <[email protected]> – 2.3.10 Wordfence Security: by Wordfence – 7.4.12 WordPress Importer: by wordpressdotorg – 0.7 WPC Custom Related Products for WooCommerce: by WPCodelibrary – 1.3.2 – Installed version not tested with active version of WooCommerce 4.7.0 WP Super Cache: by Automattic – 1.7.1 ### Dropin Plugins (1) ### db.php: Query Monitor Database Class ### Settings ### API Enabled: – Force SSL: – Currency: AUD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) 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: – ### WC Pages ### Shop base: #8090 - /catalogue/ Cart: #22643 - /cart/ Checkout: #22644 - /checkout/ My account: #22645 - /my-account/ Terms and conditions: #8093 - /toowoomba-saddlery-terms-conditions/ ### Theme ### Name: Storefront Child Theme Version: 1.0.0 Author URL: https://stuartduff.com Child Theme: ? Parent Theme Name: Storefront Parent Theme Version: 2.9.0 Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ? ### Templates ### Overrides: tscustomchild/woocommerce/checkout/review-order.php tscustomchild/woocommerce/emails/email-order-items.php /Users/beth/Local Sites/ozsaddle-stage-apache/app/public/wp-content/plugins/easy-login-woocommerce//templates//xoo-el-wc-form-login.php tscustomchild/woocommerce/single-product/add-to-cart/variation.php ### Action Scheduler ### Complete: 58 Oldest: 2020-10-28 14:23:13 +1000 Newest: 2020-11-25 09:27:15 +1000
- The topic ‘Woocommerce 4.7 – Checkout breaks when payment method is removed’ is closed to new replies.