Update WC shipping settings so no shipping zones banner appears when all are deactivated
This commit is contained in:
parent
973e50ab64
commit
9a34c4fe75
|
@ -286,7 +286,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
|
||||||
* Show zones
|
* Show zones
|
||||||
*/
|
*/
|
||||||
protected function zones_screen() {
|
protected function zones_screen() {
|
||||||
$method_count = wc_get_shipping_method_count();
|
$method_count = wc_get_shipping_method_count( false, true );
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'wc-shipping-zones',
|
'wc-shipping-zones',
|
||||||
|
|
|
@ -1495,7 +1495,7 @@ function wc_postcode_location_matcher( $postcode, $objects, $object_id_key, $obj
|
||||||
* @param bool $include_legacy Count legacy shipping methods too.
|
* @param bool $include_legacy Count legacy shipping methods too.
|
||||||
* @param bool $enabled_only Whether non-legacy shipping methods should be
|
* @param bool $enabled_only Whether non-legacy shipping methods should be
|
||||||
* restricted to enabled ones. It doesn't affect
|
* restricted to enabled ones. It doesn't affect
|
||||||
* legacy shipping methods. @since 4.2.0.
|
* legacy shipping methods. @since 4.3.0.
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function wc_get_shipping_method_count( $include_legacy = false, $enabled_only = false ) {
|
function wc_get_shipping_method_count( $include_legacy = false, $enabled_only = false ) {
|
||||||
|
|
Loading…
Reference in New Issue