LocalPickupUtils
in package
Util class for local pickup related functionality, this contains methods that need to be accessed from places besides the ShippingController, i.e. the OrderController.
Table of Contents
- get_local_pickup_method_ids() : array<string|int, string>
- Gets a list of payment method ids that support the 'local-pickup' feature.
- get_local_pickup_settings() : mixed
- Gets the local pickup location settings.
- is_local_pickup_enabled() : bool
- Checks if WC Blocks local pickup is enabled.
Methods
get_local_pickup_method_ids()
Gets a list of payment method ids that support the 'local-pickup' feature.
public
static get_local_pickup_method_ids() : array<string|int, string>
Return values
array<string|int, string> — List of payment method ids that support the 'local-pickup' feature.get_local_pickup_settings()
Gets the local pickup location settings.
public
static get_local_pickup_settings([string $context = 'view' ]) : mixed
Parameters
- $context : string = 'view'
-
The context for the settings. Defaults to 'view'.
Return values
mixed —is_local_pickup_enabled()
Checks if WC Blocks local pickup is enabled.
public
static is_local_pickup_enabled() : bool