PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.3.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.3.0
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-orders.php

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

66 lines 1.3 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 main page class.
9 *
10 * @since 1.1.0
11 */
12 class Woocommerce_Orders 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_Main_Page constructor.
24 *
25 * @since 1.1.0
26 */
27 public function __construct() {
28 parent::__construct();
29
30 $this->content = esc_html__( 'Increase average order value for your WooCommerce store with advanced checkout optimization.', '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['post_type'] ) ? htmlentities( wp_unslash( $_GET['post_type'] ) ) : ''; // phpcs:ignore
48
49 if ( 'shop_order' === $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