Add arguments to wc_get_shipping_method_count() (https://github.com/woocommerce/woocommerce-blocks/pull/2543)
This commit is contained in:
parent
a3c20b0dd8
commit
35d4031d18
|
@ -108,7 +108,7 @@ class Checkout extends AbstractBlock {
|
||||||
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
||||||
|
|
||||||
if ( $screen && $screen->is_block_editor() && ! $data_registry->exists( 'shippingMethodsExist' ) ) {
|
if ( $screen && $screen->is_block_editor() && ! $data_registry->exists( 'shippingMethodsExist' ) ) {
|
||||||
$methods_exist = wc_get_shipping_method_count() > 0;
|
$methods_exist = wc_get_shipping_method_count( false, true ) > 0;
|
||||||
$data_registry->add( 'shippingMethodsExist', $methods_exist );
|
$data_registry->add( 'shippingMethodsExist', $methods_exist );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue