woocommerce_address_providers
Filter the registered address providers.
Usage
add_filter( 'woocommerce_address_providers', 'wp_kama_woocommerce_address_providers_filter' );
/**
* Function for `woocommerce_address_providers` filter-hook.
*
* @param array $providers Array of fully qualified class names (strings) or WC_Address_Provider instances. Class names will be instantiated automatically. Example: array( 'My_Provider_Class', new My_Other_Provider() )
*
* @return array
*/
function wp_kama_woocommerce_address_providers_filter( $providers ){
// filter...
return $providers;
}
- $providers(array)
- Array of fully qualified class names (strings) or WC_Address_Provider instances. Class names will be instantiated automatically. Example: array( 'My_Provider_Class', new My_Other_Provider() )
Changelog
| Since 9.9.0 | Introduced. |
Where the hook is called
woocommerce_address_providers
woocommerce/src/Internal/AddressProvider/AddressProviderController.php 67
$provider_items = apply_filters( 'woocommerce_address_providers', array() );