Skip to content

Commit c4c7b5c

Browse files
authored
Update wc-performance-improvements.php
Bump WooCommerce version and add code for Remove the WooCommerce Admin Install Nag.
1 parent 8ee42b4 commit c4c7b5c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

wc-performance-improvements.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
* Plugin Name: Performance Improvements for WooCommerce
44
* Plugin URI: https://github.com/lukecav/performance-improvements-for-woocommerce
55
* Description: Performance tweaks related to orders on the front-end and the back-end of a store. Will also disable dashboard widgets for reviews and status in WooCommerce. Also includes specific tweaks for products in the back-end of the store.
6-
* Version: 1.0.5
6+
* Version: 1.0.6
77
* Author: Luke Cavanagh
88
* Author URI: https://github.com/lukecav
99
* License: GPL2
1010
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111
*
12-
* WC requires at least: 3.0.0
13-
* WC tested up to: 3.6.2
12+
* WC requires at least: 3.5.8
13+
* WC tested up to: 3.8.0
1414
*
1515
* @package WooCommerce_Performance_Improvements
1616
* @author Luke Cavanagh
@@ -77,5 +77,14 @@ function deregister_or_dequeue_scripts() {
7777
// Remove connect your store to WooCommerce.com admin notice
7878
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );
7979

80-
// Deregister block style from WooCommerce
80+
// Remove the WooCommerce Admin Install Nag
8181
wp_deregister_style( 'wc-block-style' );
82+
83+
// Deregister block style from WooCommerce
84+
add_filter( 'woocommerce_show_admin_notice', 'wc_disable_wc_admin_install_notice', 10, 2 );
85+
function wc_disable_wc_admin_install_notice( $notice_enabled, $notice ) {
86+
if ( 'wc_admin' === $notice ) {
87+
return false;
88+
}
89+
return $notice_enabled;
90+
}

0 commit comments

Comments
 (0)