PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / trunk
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster vtrunk
2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 1.8.1 All 42 releases
sellkit / includes / admin / notices / woocommerce-settings.php

woocommerce-settings.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster trunk, at includes/admin/notices/woocommerce-settings.php

66 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sellkit\Admin\Notices;
4
5 defined( 'ABSPATH' ) || die();
6
7 /**
8 * Woocommerce settings page class.
9 *
10 * @since 1.1.0
11 */
12 class Woocommerce_Settings extends Notice_Base {
13
14 /**
15 * Notice key.
16 *
17 * @since 1.1.0
18 * @var string
19 */
20 public $key = 'woocommerce-page-notices';
21
22 /**
23 * Woocommerce_Settings constructor.
24 *
25 * @since 1.1.0
26 */
27 public function __construct() {
28 parent::__construct();
29
30 $this->content = esc_html__( 'Unlock more engagement and sales for your WooCommerce store with advanced checkout optimization, dynamic discounts and personalized promotions.', 'sellkit' );
31 $this->buttons = [
32 'https://getsellkit.com/pricing/?utm_source=wp-dashboard&utm_campaign=gopro&utm_medium=' . $this->active_theme => esc_html__( 'Upgrade to SellKit Pro', 'sellkit' ),
33 ];
34 }
35
36 /**
37 * Check if notice is valid or not.
38 *
39 * @since 1.1.0
40 * @return bool
41 */
42 public function is_valid() {
43 if ( in_array( $this->key, $this->dismissed_notices, true ) || sellkit()->has_pro || defined( 'SELLKIT_BUNDLED' ) ) {
44 return false;
45 }
46
47 $current_page = ! empty( $_GET['page'] ) ? htmlentities( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore
48
49 if ( 'wc-settings' === $current_page ) {
50 return true;
51 }
52
53 return false;
54 }
55
56 /**
57 * Set the priority of notice.
58 *
59 * @since 1.1.0
60 * @return int
61 */
62 public function priority() {
63 return 1;
64 }
65 }
66