Version Description
- Added: Core Extensions Bundle block in Theme Panel > Licenses, so now, you just need to add one license to activate all premium extensions.
- Fixed: Theme Panel issue with PHP 5.6.
Download this release
Release Info
Developer | oceanwp |
Plugin | Ocean Extra |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- includes/panel/push-monkey-client.php +1 -1
- includes/panel/push-monkey-woocommerce.php +5 -6
- includes/panel/theme-panel.php +48 -49
- includes/panel/updater.php +5 -16
- ocean-extra.php +2 -2
- readme.txt +5 -1
includes/panel/push-monkey-client.php
CHANGED
@@ -17,7 +17,7 @@ class Ocean_Push_Monkey_Client {
|
|
17 |
|
18 |
/* Public */
|
19 |
|
20 |
-
const PLAN_NAME_KEY = '
|
21 |
|
22 |
/**
|
23 |
* Get the stats for an Account Key.
|
17 |
|
18 |
/* Public */
|
19 |
|
20 |
+
const PLAN_NAME_KEY = 'oe_push_monkey_plan_name_output';
|
21 |
|
22 |
/**
|
23 |
* Get the stats for an Account Key.
|
includes/panel/push-monkey-woocommerce.php
CHANGED
@@ -37,11 +37,10 @@ class Ocean_Woo_Commerce extends Ocean_Extra_Theme_Panel {
|
|
37 |
global $woocommerce;
|
38 |
|
39 |
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
40 |
-
$api_token = $pushmonkey
|
41 |
$stored_key = WC()->session->get( '_push_monkey' );
|
42 |
-
if( $pushmonkey
|
43 |
-
|
44 |
-
$response = $pushmonkey->apiClient->create_cart( $key, $api_token );
|
45 |
WC()->session->set( '_push_monkey', $key );
|
46 |
wc_setcookie( '_push_monkey_wc_cart_id', $key, time()+60*60*24*5 );
|
47 |
}
|
@@ -54,13 +53,13 @@ class Ocean_Woo_Commerce extends Ocean_Extra_Theme_Panel {
|
|
54 |
$order = new WC_order( $order_id );
|
55 |
$key = get_post_meta( $order_id, '_cart_id', true );
|
56 |
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
57 |
-
$api_token = $pushmonkey
|
58 |
/**
|
59 |
* Update cart if key is not empty.
|
60 |
*/
|
61 |
if( $key != '' ) {
|
62 |
|
63 |
-
$response = $pushmonkey
|
64 |
}
|
65 |
}
|
66 |
|
37 |
global $woocommerce;
|
38 |
|
39 |
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
40 |
+
$api_token = $pushmonkey::account_key();
|
41 |
$stored_key = WC()->session->get( '_push_monkey' );
|
42 |
+
if( $pushmonkey::has_account_key() && $stored_key == null ) {
|
43 |
+
$response = $pushmonkey::$apiClient->create_cart( $key, $api_token );
|
|
|
44 |
WC()->session->set( '_push_monkey', $key );
|
45 |
wc_setcookie( '_push_monkey_wc_cart_id', $key, time()+60*60*24*5 );
|
46 |
}
|
53 |
$order = new WC_order( $order_id );
|
54 |
$key = get_post_meta( $order_id, '_cart_id', true );
|
55 |
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
56 |
+
$api_token = $pushmonkey::account_key();
|
57 |
/**
|
58 |
* Update cart if key is not empty.
|
59 |
*/
|
60 |
if( $key != '' ) {
|
61 |
|
62 |
+
$response = $pushmonkey::$apiClient->update_cart( $key, $api_token );
|
63 |
}
|
64 |
}
|
65 |
|
includes/panel/theme-panel.php
CHANGED
@@ -19,14 +19,13 @@ require_once( OE_PATH .'/includes/panel/push-monkey-woocommerce.php' );
|
|
19 |
class Ocean_Extra_Theme_Panel {
|
20 |
static $push_monkey_activate;
|
21 |
|
22 |
-
const WOO_COMMERCE_ENABLED = '
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
public $woo_enabled;
|
30 |
|
31 |
/**
|
32 |
* Start things up
|
@@ -34,30 +33,30 @@ class Ocean_Extra_Theme_Panel {
|
|
34 |
public function __construct() {
|
35 |
|
36 |
// Add panel menu
|
37 |
-
add_action( 'admin_menu', array(
|
38 |
|
39 |
// Add panel submenu
|
40 |
-
add_action( 'admin_menu', array(
|
41 |
|
42 |
// Add custom CSS for the theme panel
|
43 |
-
add_action( 'admin_enqueue_scripts', array(
|
44 |
|
45 |
// Register panel settings
|
46 |
-
add_action( 'admin_init', array(
|
47 |
|
48 |
if ( self::get_push_monkey_account_key() ) {
|
49 |
|
50 |
-
add_action( 'wp_head', array(
|
51 |
-
add_action( 'init', array(
|
52 |
|
53 |
}
|
54 |
|
55 |
-
add_action( 'admin_init', array(
|
56 |
|
57 |
// Theme panel push monkey disable notice
|
58 |
if ( self::get_push_monkey_account_key() ) {
|
59 |
-
add_action( 'admin_menu', array(
|
60 |
-
add_action( 'init', array(
|
61 |
}
|
62 |
|
63 |
// wc notice hide
|
@@ -66,28 +65,28 @@ class Ocean_Extra_Theme_Panel {
|
|
66 |
}
|
67 |
|
68 |
if ( ( false == self::get_push_monkey_account_key() ) ) {
|
69 |
-
add_action( 'admin_notices', array(
|
70 |
}
|
71 |
|
72 |
if ( is_ssl() ) {
|
73 |
-
|
74 |
} else {
|
75 |
-
|
76 |
}
|
77 |
|
78 |
-
|
79 |
|
80 |
// WooCommerce
|
81 |
-
|
82 |
-
|
83 |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
84 |
-
|
85 |
-
|
86 |
}
|
87 |
-
|
88 |
|
89 |
if ( ( isset( $_GET['page'] ) ) && ( $_GET['page'] == "oceanwp-panel-woocommerce" ) ) {
|
90 |
-
add_action( 'admin_enqueue_scripts', array(
|
91 |
}
|
92 |
|
93 |
// Load addon files
|
@@ -126,7 +125,7 @@ class Ocean_Extra_Theme_Panel {
|
|
126 |
* @return boolean
|
127 |
* @since 1.4.0
|
128 |
*/
|
129 |
-
public function account_key_is_valid( $account_key ) {
|
130 |
if( ! strlen( $account_key ) ) {
|
131 |
return false;
|
132 |
}
|
@@ -151,7 +150,7 @@ class Ocean_Extra_Theme_Panel {
|
|
151 |
*
|
152 |
* @since 1.4.0
|
153 |
*/
|
154 |
-
function ocean_process_form() {
|
155 |
if ( isset( $_POST['push_monkey_woo_settings'] ) ) {
|
156 |
self::process_woo_settings( $_POST, $_FILES );
|
157 |
}
|
@@ -162,7 +161,7 @@ class Ocean_Extra_Theme_Panel {
|
|
162 |
*
|
163 |
* @since 1.4.0
|
164 |
*/
|
165 |
-
function process_woo_settings( $post, $files ) {
|
166 |
$account_key = self::account_key();
|
167 |
$title = $post['abandoned_cart_title'];
|
168 |
$message = $post['abandoned_cart_message'];
|
@@ -178,12 +177,12 @@ class Ocean_Extra_Theme_Panel {
|
|
178 |
$woo_enabled_field = true;
|
179 |
}
|
180 |
update_option( self::WOO_COMMERCE_ENABLED, $woo_enabled_field );
|
181 |
-
$updated =
|
182 |
if ( $updated ) {
|
183 |
-
add_action( 'admin_notices', array(
|
184 |
-
|
185 |
}
|
186 |
-
|
187 |
}
|
188 |
|
189 |
/**
|
@@ -191,7 +190,7 @@ class Ocean_Extra_Theme_Panel {
|
|
191 |
*
|
192 |
* @since 1.4.0
|
193 |
*/
|
194 |
-
public function woo_settings_notice() {
|
195 |
echo sprintf( esc_html__( '%1$s%2$sAbandoned cart settings saved! *woohoo*%3$s%4$sDismiss this notice.%5$s', 'ocean-extra' ), '<div class="notice notice-info is-dismissible">', '<p>', '</p>', '<button type="button" class="notice-dismiss"><span class="screen-reader-text">', '</span></button></div>' );
|
196 |
}
|
197 |
|
@@ -307,14 +306,14 @@ class Ocean_Extra_Theme_Panel {
|
|
307 |
*
|
308 |
* @since 1.4.0
|
309 |
*/
|
310 |
-
public function add_woo_page() {
|
311 |
add_submenu_page(
|
312 |
'oceanwp-panel',
|
313 |
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
314 |
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
315 |
'manage_options',
|
316 |
'oceanwp-panel-woocommerce',
|
317 |
-
array(
|
318 |
);
|
319 |
}
|
320 |
|
@@ -330,7 +329,7 @@ class Ocean_Extra_Theme_Panel {
|
|
330 |
esc_html__( 'General', 'ocean-extra' ),
|
331 |
'manage_options',
|
332 |
'oceanwp-panel',
|
333 |
-
array(
|
334 |
);
|
335 |
}
|
336 |
|
@@ -340,9 +339,9 @@ class Ocean_Extra_Theme_Panel {
|
|
340 |
* @since 1.0.0
|
341 |
*/
|
342 |
public static function register_settings() {
|
343 |
-
register_setting( 'oe_panels_settings', 'oe_panels_settings', array(
|
344 |
-
register_setting( 'oceanwp_options', 'oceanwp_options', array(
|
345 |
-
register_setting( 'oe_push_monkey_account_key', 'oe_push_monkey_account_key', array(
|
346 |
}
|
347 |
|
348 |
/**
|
@@ -864,7 +863,7 @@ class Ocean_Extra_Theme_Panel {
|
|
864 |
<h3 class="panel-title"><?php esc_attr_e( 'WooCommerce + Push Monkey', 'ocean-extra' ); ?></h3>
|
865 |
</div>
|
866 |
<div class="panel-body">
|
867 |
-
<?php if ( !
|
868 |
<h3><?php esc_attr_e( 'Did you know Push Monkey works seamlessly with WooCommerce?', 'ocean-extra' ); ?></h3>
|
869 |
<p>
|
870 |
<?php echo sprintf( esc_html__( 'The %1$sAbandoned Cart%2$s feature reminds your visitor about shopping carts that they did not check out.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
@@ -880,7 +879,7 @@ class Ocean_Extra_Theme_Panel {
|
|
880 |
<?php } ?>
|
881 |
</div>
|
882 |
</div>
|
883 |
-
<?php if (
|
884 |
<form class="push_monkey_woo_settings" name="push_monkey_woo_settings" enctype="multipart/form-data" method="post" class="form-horizontal">
|
885 |
<div class="panel panel-success">
|
886 |
<div class="panel-heading">
|
@@ -894,7 +893,7 @@ class Ocean_Extra_Theme_Panel {
|
|
894 |
</label>
|
895 |
<div class="col-md-3">
|
896 |
<label class="switch">
|
897 |
-
<input type="checkbox" class="switch" name="push_monkey_woo_enabled" <?php if (
|
898 |
>
|
899 |
<span></span>
|
900 |
</label>
|
@@ -907,7 +906,7 @@ class Ocean_Extra_Theme_Panel {
|
|
907 |
<?php esc_attr_e( 'Abandoned Cart Delay', 'ocean-extra' ); ?>
|
908 |
</label>
|
909 |
<div class="col-md-4 col-xs-12">
|
910 |
-
<input type="number" value="<?php echo
|
911 |
<span class="help-block">
|
912 |
<?php echo sprintf( esc_html__( 'The number of %1$sminutes%2$s after which the abandoned cart reminder push notification is sent.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
913 |
</span>
|
@@ -919,7 +918,7 @@ class Ocean_Extra_Theme_Panel {
|
|
919 |
<?php esc_attr_e( 'Abandoned Cart Title', 'ocean-extra' ); ?>
|
920 |
</label>
|
921 |
<div class="col-md-6 col-xs-12">
|
922 |
-
<input type="text" value="<?php echo
|
923 |
<span class="help-block">
|
924 |
<?php esc_attr_e( 'The title of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
925 |
</span>
|
@@ -931,7 +930,7 @@ class Ocean_Extra_Theme_Panel {
|
|
931 |
<?php esc_attr_e( 'Abandoned Cart Message', 'ocean-extra' ); ?>
|
932 |
</label>
|
933 |
<div class="col-md-6 col-xs-12">
|
934 |
-
<textarea name="abandoned_cart_message" id="push-monkey-abandoned-message" class="form-control" rows="3" maxlength="120"><?php echo
|
935 |
<span class="help-block">
|
936 |
<?php esc_attr_e( 'The message of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
937 |
</span>
|
@@ -947,10 +946,10 @@ class Ocean_Extra_Theme_Panel {
|
|
947 |
<span class="help-block">
|
948 |
<?php esc_attr_e( 'The image of the abandoned cart reminder push notifications. Recommended size 675px x 506px.', 'ocean-extra' ); ?>
|
949 |
</span>
|
950 |
-
<?php if (
|
951 |
<br />
|
952 |
<p><?php esc_attr_e( 'Your current image:', 'ocean-extra' ); ?></p>
|
953 |
-
<img style="width: 337px; height: 253px" src="https://getpushmonkey.com/<?php echo
|
954 |
<?php } ?>
|
955 |
</div>
|
956 |
</div>
|
@@ -970,7 +969,7 @@ class Ocean_Extra_Theme_Panel {
|
|
970 |
<?php
|
971 |
}
|
972 |
|
973 |
-
|
974 |
// Css Add
|
975 |
wp_enqueue_style( 'oe-woo-styles', plugins_url( '/assets/css/push-monkey.min.css', __FILE__ ) );
|
976 |
}
|
19 |
class Ocean_Extra_Theme_Panel {
|
20 |
static $push_monkey_activate;
|
21 |
|
22 |
+
const WOO_COMMERCE_ENABLED = 'oe_push_monkey_woo_enabled';
|
23 |
|
24 |
+
static $endpointURL;
|
25 |
+
static $apiClient;
|
26 |
+
static $woocommerce_is_active;
|
27 |
+
static $woo_settings;
|
28 |
+
static $woo_enabled;
|
|
|
29 |
|
30 |
/**
|
31 |
* Start things up
|
33 |
public function __construct() {
|
34 |
|
35 |
// Add panel menu
|
36 |
+
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_page' ), 0 );
|
37 |
|
38 |
// Add panel submenu
|
39 |
+
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_menu_subpage' ) );
|
40 |
|
41 |
// Add custom CSS for the theme panel
|
42 |
+
add_action( 'admin_enqueue_scripts', array( 'Ocean_Extra_Theme_Panel', 'css' ) );
|
43 |
|
44 |
// Register panel settings
|
45 |
+
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'register_settings' ) );
|
46 |
|
47 |
if ( self::get_push_monkey_account_key() ) {
|
48 |
|
49 |
+
add_action( 'wp_head', array( 'Ocean_Extra_Theme_Panel', 'add_push_monkey_manifest' ) );
|
50 |
+
add_action( 'init', array( 'Ocean_Extra_Theme_Panel', 'enqueue_push_monkey_scripts' ) );
|
51 |
|
52 |
}
|
53 |
|
54 |
+
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'handle_action' ) );
|
55 |
|
56 |
// Theme panel push monkey disable notice
|
57 |
if ( self::get_push_monkey_account_key() ) {
|
58 |
+
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_woo_page' ), 999 );
|
59 |
+
add_action( 'init', array( 'Ocean_Extra_Theme_Panel', 'ocean_process_form' ) );
|
60 |
}
|
61 |
|
62 |
// wc notice hide
|
65 |
}
|
66 |
|
67 |
if ( ( false == self::get_push_monkey_account_key() ) ) {
|
68 |
+
add_action( 'admin_notices', array( 'Ocean_Extra_Theme_Panel', 'push_monkey_wc_notices' ) );
|
69 |
}
|
70 |
|
71 |
if ( is_ssl() ) {
|
72 |
+
self::$endpointURL = "https://www.getpushmonkey.com";
|
73 |
} else {
|
74 |
+
self::$endpointURL = "http://www.getpushmonkey.com";
|
75 |
}
|
76 |
|
77 |
+
self::$apiClient = new Ocean_Push_Monkey_Client( self::$endpointURL );
|
78 |
|
79 |
// WooCommerce
|
80 |
+
self::$woocommerce_is_active = false;
|
81 |
+
self::$woo_settings = NULL;
|
82 |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
83 |
+
self::$woocommerce_is_active = true;
|
84 |
+
self::$woo_settings = self::$apiClient->get_woo_settings( self::account_key() );
|
85 |
}
|
86 |
+
self::$woo_enabled = get_option( self::WOO_COMMERCE_ENABLED, false );
|
87 |
|
88 |
if ( ( isset( $_GET['page'] ) ) && ( $_GET['page'] == "oceanwp-panel-woocommerce" ) ) {
|
89 |
+
add_action( 'admin_enqueue_scripts', array( 'Ocean_Extra_Theme_Panel', 'woo_setting_css' ) );
|
90 |
}
|
91 |
|
92 |
// Load addon files
|
125 |
* @return boolean
|
126 |
* @since 1.4.0
|
127 |
*/
|
128 |
+
public static function account_key_is_valid( $account_key ) {
|
129 |
if( ! strlen( $account_key ) ) {
|
130 |
return false;
|
131 |
}
|
150 |
*
|
151 |
* @since 1.4.0
|
152 |
*/
|
153 |
+
public static function ocean_process_form() {
|
154 |
if ( isset( $_POST['push_monkey_woo_settings'] ) ) {
|
155 |
self::process_woo_settings( $_POST, $_FILES );
|
156 |
}
|
161 |
*
|
162 |
* @since 1.4.0
|
163 |
*/
|
164 |
+
public static function process_woo_settings( $post, $files ) {
|
165 |
$account_key = self::account_key();
|
166 |
$title = $post['abandoned_cart_title'];
|
167 |
$message = $post['abandoned_cart_message'];
|
177 |
$woo_enabled_field = true;
|
178 |
}
|
179 |
update_option( self::WOO_COMMERCE_ENABLED, $woo_enabled_field );
|
180 |
+
$updated = self::$apiClient->update_woo_settings( $account_key, $delay, $title, $message, $image_path, $image );
|
181 |
if ( $updated ) {
|
182 |
+
add_action( 'admin_notices', array( 'Ocean_Extra_Theme_Panel', 'woo_settings_notice' ) );
|
183 |
+
self::$woo_settings = self::$apiClient->get_woo_settings( self::account_key() );
|
184 |
}
|
185 |
+
self::$woo_enabled = get_option( self::WOO_COMMERCE_ENABLED, false );
|
186 |
}
|
187 |
|
188 |
/**
|
190 |
*
|
191 |
* @since 1.4.0
|
192 |
*/
|
193 |
+
public static function woo_settings_notice() {
|
194 |
echo sprintf( esc_html__( '%1$s%2$sAbandoned cart settings saved! *woohoo*%3$s%4$sDismiss this notice.%5$s', 'ocean-extra' ), '<div class="notice notice-info is-dismissible">', '<p>', '</p>', '<button type="button" class="notice-dismiss"><span class="screen-reader-text">', '</span></button></div>' );
|
195 |
}
|
196 |
|
306 |
*
|
307 |
* @since 1.4.0
|
308 |
*/
|
309 |
+
public static function add_woo_page() {
|
310 |
add_submenu_page(
|
311 |
'oceanwp-panel',
|
312 |
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
313 |
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
314 |
'manage_options',
|
315 |
'oceanwp-panel-woocommerce',
|
316 |
+
array( 'Ocean_Extra_Theme_Panel', 'woocommerce_panel_html' )
|
317 |
);
|
318 |
}
|
319 |
|
329 |
esc_html__( 'General', 'ocean-extra' ),
|
330 |
'manage_options',
|
331 |
'oceanwp-panel',
|
332 |
+
array( 'Ocean_Extra_Theme_Panel', 'create_admin_page' )
|
333 |
);
|
334 |
}
|
335 |
|
339 |
* @since 1.0.0
|
340 |
*/
|
341 |
public static function register_settings() {
|
342 |
+
register_setting( 'oe_panels_settings', 'oe_panels_settings', array( 'Ocean_Extra_Theme_Panel', 'validate_panels' ) );
|
343 |
+
register_setting( 'oceanwp_options', 'oceanwp_options', array( 'Ocean_Extra_Theme_Panel', 'admin_sanitize_license_options' ) );
|
344 |
+
register_setting( 'oe_push_monkey_account_key', 'oe_push_monkey_account_key', array( 'Ocean_Extra_Theme_Panel', 'validate_push_monkey_account_key' ) );
|
345 |
}
|
346 |
|
347 |
/**
|
863 |
<h3 class="panel-title"><?php esc_attr_e( 'WooCommerce + Push Monkey', 'ocean-extra' ); ?></h3>
|
864 |
</div>
|
865 |
<div class="panel-body">
|
866 |
+
<?php if ( ! self::$woocommerce_is_active ) { ?>
|
867 |
<h3><?php esc_attr_e( 'Did you know Push Monkey works seamlessly with WooCommerce?', 'ocean-extra' ); ?></h3>
|
868 |
<p>
|
869 |
<?php echo sprintf( esc_html__( 'The %1$sAbandoned Cart%2$s feature reminds your visitor about shopping carts that they did not check out.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
879 |
<?php } ?>
|
880 |
</div>
|
881 |
</div>
|
882 |
+
<?php if ( self::$woocommerce_is_active ) { ?>
|
883 |
<form class="push_monkey_woo_settings" name="push_monkey_woo_settings" enctype="multipart/form-data" method="post" class="form-horizontal">
|
884 |
<div class="panel panel-success">
|
885 |
<div class="panel-heading">
|
893 |
</label>
|
894 |
<div class="col-md-3">
|
895 |
<label class="switch">
|
896 |
+
<input type="checkbox" class="switch" name="push_monkey_woo_enabled" <?php if ( self::$woo_enabled ) { ?> checked="true" <?php } ?>
|
897 |
>
|
898 |
<span></span>
|
899 |
</label>
|
906 |
<?php esc_attr_e( 'Abandoned Cart Delay', 'ocean-extra' ); ?>
|
907 |
</label>
|
908 |
<div class="col-md-4 col-xs-12">
|
909 |
+
<input type="number" value="<?php echo self::$woo_settings['abandoned_cart_delay']; ?>" name="abandoned_cart_delay" id="push-monkey-abandoned-delay" class="form-control" min="0" step="1" />
|
910 |
<span class="help-block">
|
911 |
<?php echo sprintf( esc_html__( 'The number of %1$sminutes%2$s after which the abandoned cart reminder push notification is sent.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
912 |
</span>
|
918 |
<?php esc_attr_e( 'Abandoned Cart Title', 'ocean-extra' ); ?>
|
919 |
</label>
|
920 |
<div class="col-md-6 col-xs-12">
|
921 |
+
<input type="text" value="<?php echo self::$woo_settings['abandoned_cart_title']; ?>" name="abandoned_cart_title" id="push-monkey-abandoned-title" class="form-control" maxlength="30"/>
|
922 |
<span class="help-block">
|
923 |
<?php esc_attr_e( 'The title of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
924 |
</span>
|
930 |
<?php esc_attr_e( 'Abandoned Cart Message', 'ocean-extra' ); ?>
|
931 |
</label>
|
932 |
<div class="col-md-6 col-xs-12">
|
933 |
+
<textarea name="abandoned_cart_message" id="push-monkey-abandoned-message" class="form-control" rows="3" maxlength="120"><?php echo self::$woo_settings['abandoned_cart_message']; ?></textarea>
|
934 |
<span class="help-block">
|
935 |
<?php esc_attr_e( 'The message of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
936 |
</span>
|
946 |
<span class="help-block">
|
947 |
<?php esc_attr_e( 'The image of the abandoned cart reminder push notifications. Recommended size 675px x 506px.', 'ocean-extra' ); ?>
|
948 |
</span>
|
949 |
+
<?php if ( self::$woo_settings['abandoned_cart_image'] ) {?>
|
950 |
<br />
|
951 |
<p><?php esc_attr_e( 'Your current image:', 'ocean-extra' ); ?></p>
|
952 |
+
<img style="width: 337px; height: 253px" src="https://getpushmonkey.com/<?php echo self::$woo_settings['abandoned_cart_image']; ?>" />
|
953 |
<?php } ?>
|
954 |
</div>
|
955 |
</div>
|
969 |
<?php
|
970 |
}
|
971 |
|
972 |
+
public static function woo_setting_css() {
|
973 |
// Css Add
|
974 |
wp_enqueue_style( 'oe-woo-styles', plugins_url( '/assets/css/push-monkey.min.css', __FILE__ ) );
|
975 |
}
|
includes/panel/updater.php
CHANGED
@@ -87,7 +87,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
|
|
87 |
add_action( 'admin_init', array( $this, 'oceanwp_show_changelog' ) );
|
88 |
|
89 |
// Add core extensions bundle block
|
90 |
-
|
91 |
|
92 |
// Add core extensions bundle validation
|
93 |
add_action('admin_init', array( $this, 'add_core_extensions_bundle_validation'), 0);
|
@@ -180,7 +180,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
|
|
180 |
switch ($oceanwp_bundle_status) {
|
181 |
|
182 |
case 'expired' :
|
183 |
-
_e('Your license key is
|
184 |
|
185 |
break;
|
186 |
|
@@ -309,30 +309,18 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
|
|
309 |
}
|
310 |
}
|
311 |
}
|
312 |
-
//rf@objects//
|
313 |
-
//update_option("oceanwp_bundle_key", $_POST['core_extensions_bundle_license_key']);
|
314 |
$this->update_oceanwp_option("oceanwp_bundle_key", $_POST['core_extensions_bundle_license_key']);
|
315 |
-
//end//
|
316 |
-
|
317 |
$this->update_oceanwp_option("oceanwp_activated_licenses_by_bundle", $activated_licenses_by_bundle);
|
318 |
}
|
319 |
-
//rf@objects//
|
320 |
-
// update_option("oceanwp_bundle_status", $license_data->license);
|
321 |
-
//update_option("oceanwp_bundle_expires", $license_data->expires);
|
322 |
$this->update_oceanwp_option("oceanwp_bundle_status", $license_data->license);
|
323 |
$this->update_oceanwp_option("oceanwp_bundle_expires", $license_data->expires);
|
324 |
$this->update_oceanwp_option("oceanwp_options", $_POST['oceanwp_options']);
|
325 |
-
//end//
|
326 |
}
|
327 |
} elseif (isset($_POST['deactivate_all'])) {
|
328 |
-
|
329 |
$this->delete_oceanwp_option('oceanwp_bundle_status');
|
330 |
-
//delete_option("oceanwp_bundle_status");
|
331 |
$this->delete_oceanwp_option('oceanwp_bundle_key');
|
332 |
-
//delete_option("oceanwp_bundle_key");
|
333 |
$this->delete_oceanwp_option('oceanwp_bundle_expires');
|
334 |
-
//delete_option("oceanwp_bundle_expires");
|
335 |
-
//end//
|
336 |
$this->delete_oceanwp_option('oceanwp_activated_licenses_by_bundle');
|
337 |
|
338 |
$license_details = get_option('edd_license_details');
|
@@ -342,7 +330,8 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
|
|
342 |
// loop over active licenses and deactive
|
343 |
foreach ($license_details as $key => $value) {
|
344 |
|
345 |
-
$
|
|
|
346 |
}
|
347 |
}
|
348 |
}
|
87 |
add_action( 'admin_init', array( $this, 'oceanwp_show_changelog' ) );
|
88 |
|
89 |
// Add core extensions bundle block
|
90 |
+
add_action('oceanwp_licenses_tab_top', array( $this, 'add_core_extensions_bundle_block') );
|
91 |
|
92 |
// Add core extensions bundle validation
|
93 |
add_action('admin_init', array( $this, 'add_core_extensions_bundle_validation'), 0);
|
180 |
switch ($oceanwp_bundle_status) {
|
181 |
|
182 |
case 'expired' :
|
183 |
+
_e('Your license key is expired. Please renew your license key for auto updates.', 'ocean-extra');
|
184 |
|
185 |
break;
|
186 |
|
309 |
}
|
310 |
}
|
311 |
}
|
|
|
|
|
312 |
$this->update_oceanwp_option("oceanwp_bundle_key", $_POST['core_extensions_bundle_license_key']);
|
|
|
|
|
313 |
$this->update_oceanwp_option("oceanwp_activated_licenses_by_bundle", $activated_licenses_by_bundle);
|
314 |
}
|
|
|
|
|
|
|
315 |
$this->update_oceanwp_option("oceanwp_bundle_status", $license_data->license);
|
316 |
$this->update_oceanwp_option("oceanwp_bundle_expires", $license_data->expires);
|
317 |
$this->update_oceanwp_option("oceanwp_options", $_POST['oceanwp_options']);
|
|
|
318 |
}
|
319 |
} elseif (isset($_POST['deactivate_all'])) {
|
320 |
+
$activated_licenses_by_bundle = get_option("oceanwp_activated_licenses_by_bundle");
|
321 |
$this->delete_oceanwp_option('oceanwp_bundle_status');
|
|
|
322 |
$this->delete_oceanwp_option('oceanwp_bundle_key');
|
|
|
323 |
$this->delete_oceanwp_option('oceanwp_bundle_expires');
|
|
|
|
|
324 |
$this->delete_oceanwp_option('oceanwp_activated_licenses_by_bundle');
|
325 |
|
326 |
$license_details = get_option('edd_license_details');
|
330 |
// loop over active licenses and deactive
|
331 |
foreach ($license_details as $key => $value) {
|
332 |
|
333 |
+
if (is_array($activated_licenses_by_bundle) && in_array($key . '_license_key', $activated_licenses_by_bundle))
|
334 |
+
$_POST['oceanwp_' . $key . '_license_key_deactivate'] = TRUE;
|
335 |
}
|
336 |
}
|
337 |
}
|
ocean-extra.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Ocean Extra
|
4 |
* Plugin URI: https://oceanwp.org/extension/ocean-extra/
|
5 |
* Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
|
6 |
-
* Version: 1.4.
|
7 |
* Author: OceanWP
|
8 |
* Author URI: https://oceanwp.org/
|
9 |
* Requires at least: 4.5.0
|
@@ -86,7 +86,7 @@ final class Ocean_Extra {
|
|
86 |
$this->token = 'ocean-extra';
|
87 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
88 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
89 |
-
$this->version = '1.4.
|
90 |
|
91 |
define( 'OE_URL', $this->plugin_url );
|
92 |
define( 'OE_PATH', $this->plugin_path );
|
3 |
* Plugin Name: Ocean Extra
|
4 |
* Plugin URI: https://oceanwp.org/extension/ocean-extra/
|
5 |
* Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
|
6 |
+
* Version: 1.4.2
|
7 |
* Author: OceanWP
|
8 |
* Author URI: https://oceanwp.org/
|
9 |
* Requires at least: 4.5.0
|
86 |
$this->token = 'ocean-extra';
|
87 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
88 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
89 |
+
$this->version = '1.4.2';
|
90 |
|
91 |
define( 'OE_URL', $this->plugin_url );
|
92 |
define( 'OE_PATH', $this->plugin_path );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: oceanwp
|
|
3 |
Tags: widgets, meta box, metaboxes, metabox, oceanwp
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.9.1
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -32,6 +32,10 @@ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
|
|
35 |
= 1.4.1 =
|
36 |
- Fixed: Scripts & Styles issue on the Theme Panel page.
|
37 |
- Fixed: Licenses issue on mulsite, now you can enable your premium extensions licenses for all your subsites.
|
3 |
Tags: widgets, meta box, metaboxes, metabox, oceanwp
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.9.1
|
6 |
+
Stable tag: 1.4.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.4.2 =
|
36 |
+
- Added: Core Extensions Bundle block in Theme Panel > Licenses, so now, you just need to add one license to activate all premium extensions.
|
37 |
+
- Fixed: Theme Panel issue with PHP 5.6.
|
38 |
+
|
39 |
= 1.4.1 =
|
40 |
- Fixed: Scripts & Styles issue on the Theme Panel page.
|
41 |
- Fixed: Licenses issue on mulsite, now you can enable your premium extensions licenses for all your subsites.
|