Internal Server Error after Admin update when ordering virtual products
-
Shortly after our site updated to Woocommerce Admin on 24 Feb, we started getting “internal server error” messages when customers attempted to complete orders that only contained PDFs (downloadable and Virtual).
We’ve opened a ticket with the shipping plugin vendor (Elex), but were wondering if anyone has any other suggestions. From the below it seems like the shipping plugin is trying to calculate shipping / packaging for the order, even though the order is not shippable.
This happens on multiple products, and only when the overall order only contains PDFs. A mix of physical and PDFs appears to work.
The products are all structured as “variable products” with a physical variation and a PDF / downloadable / virtual variation. We’ve tried adjusting shipping classes so the PDF variation does not have a “shippable” parent class, but that didn’t seem to work.
Any help greatly appreciated. In looking at the plugin directory, we see multiple updates to plugin folders over time, but the errors started only after the woocommerce admin update on 24 Feb (there were no other updates that day, and successful PDF only orders between the last plugin update and the woocommerce admin plugin update).
The error_log file shows the following when these occur:
[26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "destination" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type null in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "contents" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type int in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type null in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type int in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "destination" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type null in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "contents" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "destination" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type null in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "contents" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "destination" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Trying to access array offset on value of type null in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590 [26-Feb-2022 17:39:53 UTC] PHP Warning: Undefined array key "contents" in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2618 [26-Feb-2022 17:39:53 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php:2590 Stack trace: #0 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php(1913): WF_Shipping_USPS->box_shipping('12') #1 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php(1255): WF_Shipping_USPS->get_package_requests(Array) #2 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php(233): WF_Shipping_USPS->calculate_shipping(Array) #3 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce/includes/class-wc-shipping.php(348): WC_Shipping_Method->get_rates_for_package(Array) #4 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce-services/woocommerce-services.php(1099): WC_Shipping->calculate_shipping_for_package(Array) #5 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(307): WC_Connect_Loader->track_completed_order(4100, Array, Object(Automattic\WooCommerce\Admin\Overrides\Order)) #6 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #7 /home2/theraypr/public_html/everydaystitches/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #8 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1183): do_action('woocommerce_che...', 4100, Array, Object(Automattic\WooCommerce\Admin\Overrides\Order)) #9 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(461): WC_Checkout->process_checkout() #10 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(307): WC_AJAX::checkout('') #11 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #12 /home2/theraypr/public_html/everydaystitches/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #13 /home2/theraypr/public_html/everydaystitches/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action('wc_ajax_checkou...') #14 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(307): WC_AJAX::do_wc_ajax('') #15 /home2/theraypr/public_html/everydaystitches/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(false, Array) #16 /home2/theraypr/public_html/everydaystitches/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #17 /home2/theraypr/public_html/everydaystitches/wp-includes/template-loader.php(13): do_action('template_redire...') #18 /home2/theraypr/public_html/everydaystitches/wp-blog-header.php(19): require_once('/home2/theraypr...') #19 /home2/theraypr/public_html/everydaystitches/index.php(17): require('/home2/theraypr...') #20 {main} thrown in /home2/theraypr/public_html/everydaystitches/wp-content/plugins/usps-woocommerce-shipping/includes/class-wf-shipping-usps.php on line 2590
The page I need help with: [log in to see the link]
- The topic ‘Internal Server Error after Admin update when ordering virtual products’ is closed to new replies.