woocommerce_admin_plugins_pre_activate
Filter the list of plugins to activate.
Usage
add_filter( 'woocommerce_admin_plugins_pre_activate', 'wp_kama_woocommerce_admin_plugins_pre_activate_filter' ); /** * Function for `woocommerce_admin_plugins_pre_activate` filter-hook. * * @param array $plugins A list of the plugins to activate. * * @return array */ function wp_kama_woocommerce_admin_plugins_pre_activate_filter( $plugins ){ // filter... return $plugins; }
- $plugins(array)
- A list of the plugins to activate.
Changelog
Since 6.4.0 | Introduced. |
Where the hook is called
woocommerce_admin_plugins_pre_activate
woocommerce/src/Admin/PluginsHelper.php 435
$plugins = apply_filters( 'woocommerce_admin_plugins_pre_activate', $plugins );
Where the hook is used in WooCommerce
woocommerce/src/Internal/Admin/Onboarding/OnboardingJetpack.php 33
add_action( 'woocommerce_admin_plugins_pre_activate', array( $this, 'activate_and_install_jetpack_ahead_of_wcpay' ) );