ShippingController::override_cost_requires_address_option()publicWC 1.0

Overrides the option to force shipping calculations NOT to wait until an address is entered, but only if the Checkout page contains the Checkout Block.

Метод класса: ShippingController{}

Хуков нет.


true|false. Whether shipping cost calculation should require an address to be entered before calculating.


$ShippingController = new ShippingController();
$ShippingController->override_cost_requires_address_option( $value );
$value(true|false) (обязательный)
Whether shipping cost calculation requires address to be entered.

Код ShippingController::override_cost_requires_address_option() WC 7.7.2

public function override_cost_requires_address_option( $value ) {
	if ( CartCheckoutUtils::is_checkout_block_default() ) {
		return 'no';
	return $value;