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