Automattic\WooCommerce\Blocks\Shipping
ShippingController::override_cost_requires_address_option()
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.
Method of the class: ShippingController{}
No Hooks.
Return
true|false
. Whether shipping cost calculation should require an address to be entered before calculating.
Usage
$ShippingController = new ShippingController(); $ShippingController->override_cost_requires_address_option( $value );
- $value(true|false) (required)
- Whether shipping cost calculation requires address to be entered.
ShippingController::override_cost_requires_address_option() ShippingController::override cost requires address option code WC 9.2.3
public function override_cost_requires_address_option( $value ) { if ( CartCheckoutUtils::is_checkout_block_default() && $this->local_pickup_enabled ) { return 'no'; } return $value; }