Shipping settings form reduced size after update to 7.4.0
-
Hello,
I have a small issue with the shipping method settings from the custom plugin.
Normally the form looks like this:But after an upgrade to 7.4.0 the form looks like this:
In fact this is the form that is displayed when the same shipping method is edited from inside the shipping zone.
After investigation, I find that the culprit to this is:
~/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Shipping/ShippingController.php
If I add a condition to this function, not to load shipping zones when at the settings screen, then all is good. One sample is like this (at the start of the function):
if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'wc-settings' && isset($_GET['tab']) && $_GET['tab'] == 'shipping' && isset($_GET['section']) && $_GET['section'] != '') { return; }
So, there are 2 questions here:
- Why is this function call needed, when at the shipping settings screen?
- How can I guarantee, that “WC_Shipping_Method::init_form_fields()” returns the full form, if needed and not the shipping_zone specific form. Because this is not the firs time, third party plugins load shipping zones whereever they please and then ruin the main settings form because of it.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Shipping settings form reduced size after update to 7.4.0’ is closed to new replies.