Fatal error shipping/flat-rate
-
Got error ‘PHP message: PHP Warning: Invalid argument supplied for foreach() in /xxx/public_html/wp-content/plugins/woocommerce/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php on line 239\n’, referer: https://www.brandweetjes.nl/webshop/kinderen/brandweer-memory/
Got error ‘PHP message: PHP Warning: Invalid argument supplied for foreach() in /xxx/public_html/wp-content/plugins/woocommerce/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php on line 239\n’ referer: https://www.brandweetjes.nl/checkout/
I’ve got this error logs back from my hosting company, because it is slowing down my websit and others on the server. It happens when I edit a product in the part ‘productinformation’ although it is not necessarily the flat-rate I’m editting. It can also be after adding a custom product property.
Please help me out!
-
This topic was modified 6 years, 7 months ago by
Lauravl.
-
This topic was modified 6 years, 7 months ago by
Lauravl.
The page I need help with: [log in to see the link]
-
This topic was modified 6 years, 7 months ago by
-
Hi there,
Just to make sure: Are you still seeing that error after removing the custom product property?
In addition, would you mind sharing the system status report as found under WooCommerce > System Status?
Thanks!
I did some more research. It seems to happen everytime I edit a product, no matter what I edit. It could also be the description, or like in this case when someone ordered something this morning.
But I changed something at the taxes pages and I didn’t get it anymore after editting a product. But I got the message again after making a test order:
[Tue Oct 29 12:58:53.584274 2019] [proxy_fcgi:error] [pid 6435:tid 140658700396288] [client 188.201.135.89:13727] AH01071: Got error ‘PHP message: PHP Warning: Invalid argument supplied for foreach() in xxxx/public_html/wp-content/plugins/woocommerce/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php on line 239\n’, referer: https://www.brandweetjes.nl/checkout/I had another server error also:
[Tue Oct 29 07:44:01.385800 2019] [access_compat:error] [pid 28705:tid 140658381530880] [client 77.162.209.44:42890] AH01797: client denied by server configuration: xxx/domains/brandweetjes.nl/private_html/wp-content/uploads/woocommerce_uploads/2019/10/brw_vlaggenlijn_instructies_voorwaarden.pdf, referer: https://www.brandweetjes.nl/checkout/order-received/11215/?key=wc_order_6XW84EQNdZev4&utm_nooverride=1
Can you see where that comes from?
-
This reply was modified 6 years, 7 months ago by
Lauravl.
These errors seems to happen at digital products, where there is no shipping class anyhow. Can that be the problem?
### WordPress Environment ### WordPress address (URL): https://www.brandweetjes.nl Site address (URL): https://www.brandweetjes.nl WC Version: 3.7.1 REST API Version: ✔ 1.0.2 Log Directory Writable: ✔ WP Version: 5.2.4 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: nl_NL External object cache: – ### Server Environment ### Server Info: Apache/2 PHP Version: 7.2.24 PHP Post Max Size: 300 MB PHP Time Limit: 360 PHP Max Input Vars: 10000 cURL Version: 7.66.0 OpenSSL/1.0.1e-fips SUHOSIN Installed: – MySQL Version: 5.6.27 Max Upload Size: 300 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 3.7.1 WC Database Prefix: wp_ Totale databasegrootte: 77.89MB Database datagrootte: 58.98MB Database index grootte: 18.91MB wp_woocommerce_sessions: Data: 4.02MB + Index: 0.08MB + 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.11MB + Index: 0.22MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.13MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.53MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + 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_categorymeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 1.52MB + Index: 0.59MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_member_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 9.06MB + Index: 0.23MB + Engine InnoDB wp_portfolio_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_postmeta: Data: 19.16MB + Index: 12.64MB + Engine InnoDB wp_posts: Data: 7.44MB + Index: 0.94MB + Engine InnoDB wp_product_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_redirection_404: Data: 0.28MB + Index: 0.33MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_redirection_logs: Data: 0.08MB + Index: 0.08MB + Engine InnoDB wp_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.27MB + Index: 0.23MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + 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.06MB + 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.31MB + Index: 0.47MB + 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_wdi_feeds: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wdi_themes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 1.27MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 6.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 2.02MB + Index: 1.14MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.11MB + Index: 0.03MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 1.02MB + Index: 0.09MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpgdprc_consents: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpgdprc_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_yoast_seo_links: Data: 0.08MB + Index: 0.02MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.09MB + Index: 0.00MB + Engine InnoDB ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (28) ### WPMU DEV Dashboard: door WPMU DEV – 4.7.3.5 Akismet Anti-Spam: door Automattic – 4.1.2 Klassieke editor: door WordPress-bijdragers – 1.5 Contact Form 7: door Takayuki Miyoshi – 5.1.4 Dynamic Featured Image: door Ankit Pokhrel – 3.7.0 Google Analytics Dashboard for WP (GADWP): door ExactMetrics – 5.3.9 WPBakery Page Builder: door Michael M - WPBakery.com – 6.0.5 Mollie Payments for WooCommerce: door Mollie – 5.3.0 My WP Translate: door MyThemeShop – 1.0.8 Porto Theme - Functionality: door P-Themes – 1.4 Really Simple SSL: door Rogier Lankhorst Mark Wolters – 3.2.6 Redirection: door John Godley – 4.4.2 Server IP & Memory Usage Display: door Apasionados Apasionados del Marketing – 2.1.0 Simple Custom CSS: door John Regan Danny Van Kooten – 4.0.3 UpdraftPlus - Backup/Restore: door UpdraftPlus.Com DavidAnderson – 1.16.17 WebP Express: door Bjørn Rosell – 0.17.2 Checkout Field Editor for WooCommerce: door ThemeHigh – 1.3.9 Extra Product Options (Product Addons) for WooCommerce: door ThemeHigh – 2.0.7 Advanced Order Export For WooCommerce: door AlgolPlus – 3.0.3 WooCommerce MyParcel: door Adem Demir – 3.1.7 – Niet getest met de actieve versie van WooCommerce WooCommerce PDF Invoices & Packing Slips: door Ewout Fernhout – 2.3.5 WooCommerce: door Automattic – 3.7.1 Yoast SEO Premium: door Team Yoast – 12.3 WP Cookie Law Info: door Anshul Labs – 1.0 WP Crontrol: door John Blackbourn & crontributors – 1.7.1 Hummingbird Pro: door WPMU DEV – 2.1.1 Smush: door WPMU DEV – 3.3.1 Yoast SEO: WooCommerce: door Team Yoast – 12.2 ### Inactive Plugins (5) ### BackWPup: door Inpsyde GmbH – 3.6.10 Hummingbird: door WPMU DEV – 2.1.1 Slider Revolution: door ThemePunch – 5.2.6 WPBakery Visual Composer: door Michael M - WPBakery.com – 4.12 Yoast SEO: door Team Yoast – 12.3 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: ✔ Force SSL: – Currency: EUR (€) Currency Position: left_space 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 ### Winkelbasis: #207 - /shop/ Winkelmand: #208 - /cart/ Afrekenen: #1121 - /checkout/ Mijn account: #1122 - /my-account/ Algemene voorwaarden: #1473 - /algemene-voorwaarden/ ### Theme ### Name: Porto Child Version: 1.1 Author URL: https://www.portotheme.com/ Child Theme: ✔ Parent Theme Name: Porto Parent Theme Version: 5.0.1 Parent Theme Author URL: http://www.portotheme.com/ WooCommerce Support: ✔ ### Templates ### Overrides: porto/woocommerce/archive-product.php porto-child/woocommerce/cart/cart-shipping.php porto-child/woocommerce/cart/cart-totals.php porto/woocommerce/cart/cart.php porto/woocommerce/cart/cross-sells.php porto-child/woocommerce/cart/mini-cart.php porto-child/woocommerce/cart/proceed-to-checkout-button.php porto-child/woocommerce/cart/shipping-calculator.php porto-child/woocommerce/checkout/form-billing.php porto-child/woocommerce/checkout/form-checkout.php porto-child/woocommerce/checkout/form-coupon.php porto/woocommerce/checkout/form-login.php porto/woocommerce/checkout/form-pay.php porto-child/woocommerce/checkout/payment.php porto-child/woocommerce/checkout/review-order.php porto/woocommerce/content-product.php porto/woocommerce/content-product_cat.php porto/woocommerce/content-single-product.php porto/woocommerce/content-widget-product.php porto-child/woocommerce/emails/customer-completed-order.php porto-child/woocommerce/emails/customer-processing-order.php porto/woocommerce/global/form-login.php porto/woocommerce/global/quantity-input.php porto/woocommerce/global/wrapper-start.php porto/woocommerce/loop/add-to-cart.php porto/woocommerce/loop/loop-end.php porto/woocommerce/loop/loop-start.php porto/woocommerce/loop/no-products-found.php porto/woocommerce/loop/orderby.php porto/woocommerce/loop/pagination.php porto/woocommerce/loop/rating.php porto/woocommerce/loop/sale-flash.php porto/woocommerce/myaccount/downloads.php porto/woocommerce/myaccount/form-add-payment-method.php porto/woocommerce/myaccount/form-edit-account.php porto/woocommerce/myaccount/form-edit-address.php porto/woocommerce/myaccount/form-login.php porto/woocommerce/myaccount/form-lost-password.php porto/woocommerce/myaccount/form-reset-password.php porto/woocommerce/myaccount/lost-password-confirmation.php porto/woocommerce/myaccount/my-account.php porto/woocommerce/myaccount/my-address.php porto/woocommerce/myaccount/my-downloads.php porto/woocommerce/myaccount/my-orders.php porto/woocommerce/myaccount/orders.php porto/woocommerce/myaccount/payment-methods.php porto/woocommerce/myaccount/view-order.php porto/woocommerce/order/form-tracking.php porto/woocommerce/order/tracking.php porto/woocommerce/single-product/add-to-cart/simple.php porto/woocommerce/single-product/add-to-cart/variable.php porto-child/woocommerce/single-product/meta.php porto/woocommerce/single-product/product-attributes.php porto/woocommerce/single-product/product-image.php porto/woocommerce/single-product/product-thumbnails.php porto/woocommerce/single-product/rating.php porto/woocommerce/single-product/related.php porto/woocommerce/single-product/review-meta.php porto/woocommerce/single-product/review-rating.php porto/woocommerce/single-product/review.php porto/woocommerce/single-product/sale-flash.php porto/woocommerce/single-product/short-description.php porto/woocommerce/single-product/tabs/tabs.php porto/woocommerce/single-product/title.php porto/woocommerce/single-product/up-sells.php porto/woocommerce/single-product-reviews.php ### Action Scheduler ### Complete: 123 Oldest: 2019-10-24 17:57:34 +0000 Newest: 2019-10-29 12:54:08 +0000 Pending: 1 Oldest: 2019-10-29 13:54:11 +0000 Newest: 2019-10-29 13:54:11 +0000 Canceled: 0 Oldest: – Newest: – In-progress: 0 Oldest: – Newest: – Failed: 0 Oldest: – Newest: –I tried to test with in actual product with shipping cost and than I don’t have the issue. It seems to be in the digital products.
Hi @lauravl!
This issue is usually tied to a conflict between core and either your theme or another plugin.
With that said, I’d recommend you switch to a default WordPress theme, like Storefront, to see if the issue persists. If the issue goes away, then you’ll need to contact your theme author to resolve this. If the issue is still there, then you’ll need to disable all your plugins, except for WooCommerce, to see if that resolves the issue. If it does, please re-enable your features one at a time until it breaks again, and then contact the author of the conflicting plugin.
Cheers!
Howdy!
We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.
Cheers!
-
This reply was modified 6 years, 7 months ago by
The topic ‘Fatal error shipping/flat-rate’ is closed to new replies.