true ] ) ); } } /** * Suppress WooCommerce admin notices. * * @filter woocommerce_show_admin_notice * @since 3.11.0 * * @param bool $bool Boolean value to show/suppress the notice. * @param string $notice The notice name being displayed. * * @return bool True to show the notice, false to suppress it. */ public function suppress_notices( $bool, $notice ) { // Suppress the SSL notice when using a temp domain. if ( 'no_secure_connection' === $notice && Plugin::is_temp_domain() ) { return false; } // Suppress the "Install WooCommerce Admin" notice when the Setup Wizard notice is visible. if ( 'wc_admin' === $notice && in_array( 'install', (array) get_option( 'woocommerce_admin_notices', [] ), true ) ) { return false; } return $bool; } /** * Suppress WooCommerce helper admin notices when on a eCommerce Managed WordPress plan. * * @filter woocommerce_helper_suppress_connect_notice * * @param bool $bool Boolean value to show/suppress the notice. * * @return bool True when a eCommerce Managed WordPress plan, else false. */ public function suppress_helper_notices() { return Plugin::has_plan( 'eCommerce Managed WordPress' ); } }