WooCommerce Code Reference

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.
is_local_pickup_method()  : bool
Checks if a method is a local pickup method.

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
Return values
boolTrue if local pickup is enabled.

is_local_pickup_method()

Checks if a method is a local pickup method.

public static is_local_pickup_method(string $method_id) : bool
Parameters
$method_id : string

The method id to check.

Return values
boolTrue if the method is a local pickup method.