PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.6.3
ShopBuilder – WooCommerce Builder For Elementor v2.6.3
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/Admin/Notice/Review.php +5 -18 2.1.42.6.3 View file →
@@ -24,10 +24,8 @@
24 24 */
25 25 private function __construct() {
26 26 add_action( 'admin_init', [ $this, 'check_installation_time' ], 10 );
27 27 add_action( 'admin_init', [ $this, 'notice_actions' ], 5 );
28 -
29 - $this->remove_all_notices();
30 28 }
31 29
32 30 /**
33 31 * Check if review notice should be shown or not
@@ -34,8 +32,9 @@
34 32 *
35 33 * @return void
36 34 */
37 35 public function check_installation_time() {
36 +
38 37 $nobug = get_option( 'rtsb_admin_review_spare_me' );
39 38 $rated = get_option( 'rtsb_admin_review_rated' );
40 39
41 40 if ( '1' == $nobug || 'yes' == $rated ) {
@@ -66,8 +65,9 @@
66 65 *
67 66 * @return void
68 67 */
69 68 public function notice_actions() {
69 + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
70 70 if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'rtsb_notice_nonce' ) ) {
71 71 return;
72 72 }
73 73
@@ -126,8 +126,11 @@
126 126 /**
127 127 * Display Admin Notice, asking for a review
128 128 **/
129 129 public function display_admin_notice() {
130 + if ( isset( $GLOBALS['woobundle_notice'] ) || isset( $GLOBALS['rtsb__notice'] ) ) {
131 + return;
132 + }
130 133 global $pagenow;
131 134
132 135 $exclude = [
133 136 'themes.php',
@@ -298,21 +301,5 @@
298 301 <?php
299 302 }
300 303 }
301 304
302 - /**
303 - * Remove admin notices
304 - */
305 - public function remove_all_notices() {
306 - add_action(
307 - 'in_admin_header',
308 - function () {
309 - $screen = get_current_screen();
310 - if ( in_array( $screen->base, [ 'shopbuilder_page_rtsb-get-help' ], true ) ) {
311 - remove_all_actions( 'admin_notices' );
312 - remove_all_actions( 'all_admin_notices' );
313 - }
314 - },
315 - 1000
316 - );
317 - }
318 305 }