woocommerce_marketing_channels
Filter the list of registered marketing channels.
Использование
add_filter( 'woocommerce_marketing_channels', 'wp_kama_woocommerce_marketing_channels_filter' ); /** * Function for `woocommerce_marketing_channels` filter-hook. * * @param MarketingChannelInterface[] $channels Array of registered marketing channels. * * @return MarketingChannelInterface[] */ function wp_kama_woocommerce_marketing_channels_filter( $channels ){ // filter... return $channels; }
- $channels(MarketingChannelInterface[])
- Array of registered marketing channels.
Список изменений
С версии . | Введена. |
Где вызывается хук
woocommerce_marketing_channels
woocommerce/src/Admin/Marketing/MarketingChannels.php 62
$channels = apply_filters( 'woocommerce_marketing_channels', $this->registered_channels );