woocommerce_show_autoinstalled_plugin_notices
Filter to suppress the notice about autoinstalled plugins in the plugins list page.
Использование
add_filter( 'woocommerce_show_autoinstalled_plugin_notices', 'wp_kama_woocommerce_show_autoinstalled_plugin_notices_filter' );
/**
* Function for `woocommerce_show_autoinstalled_plugin_notices` filter-hook.
*
* @param bool $display_notice Whether notices should be displayed or not.
*
* @return bool
*/
function wp_kama_woocommerce_show_autoinstalled_plugin_notices_filter( $display_notice ){
// filter...
return $display_notice;
}
- $display_notice(true|false)
- Whether notices should be displayed or not.
Список изменений
| С версии 8.8.0 | Введена. |
Где вызывается хук
woocommerce_show_autoinstalled_plugin_notices
woocommerce/src/Internal/Utilities/PluginInstaller.php 241
if ( ! apply_filters( 'woocommerce_show_autoinstalled_plugin_notices', '__return_true' ) ) {