Skip to content

Commit c916a4b

Browse files
committed
Bump to version 5.5.0
1 parent feecee0 commit c916a4b

File tree

8 files changed

+23
-890
lines changed

8 files changed

+23
-890
lines changed

.distignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
.distignore
77
.gitignore
88
README.md
9+
gulpfile.js
10+
package.json
11+
package-lock.json

.wordpress-org/readme/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: dueclic
44
Tags: emailchef,newsletter,woocommerce,ecommerce,email
55
Requires at least:6.0
66
Tested up to: 6.7
7-
Stable tag: 5.4
7+
Stable tag: 5.5.0
88
WC requires at least: 8.3.1
99
WC tested up to: 9.6.1
1010
License: GPLv2 or later
@@ -71,6 +71,9 @@ add_filter('emailchef_abandoned_cart_image_size', 'emailchef_abandoned_cart_imag
7171

7272
== Changelog ==
7373

74+
= 5.5.0 =
75+
* Small fixes
76+
7477
= 5.4 =
7578
* Responsive fixes in Admin Area
7679

includes/class-wc-emailchef-handler.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ final class WC_Emailchef_Handler {
1212

1313
private $namespace;
1414

15+
private $id = "emailchef";
16+
17+
/**
18+
* @var WC_Emailchef_Plugin
19+
*/
20+
private $wcec;
21+
1522
public function __construct() {
1623

17-
$this->id = 'emailchef';
1824
$this->namespace = 'wc_' . $this->id;
19-
$this->label = __( 'Emailchef', 'emailchef-for-woocommerce' );
2025
$this->wcec = WCEC();
2126
$this->hooks();
2227

includes/class-wc-emailchef-plugin.php

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public static function get_instance() {
5656
self::$instance->includes();
5757
self::$instance->emailchef();
5858
self::$instance->handler = WC_Emailchef_Handler::get_instance();
59-
self::$instance->load_translations();
6059

6160

6261
do_action( "wc_emailchef_loaded" );
@@ -83,12 +82,7 @@ public static function version_check( $version = '3.0' ) {
8382
*/
8483

8584
public static function version() {
86-
if ( ! function_exists( 'get_plugin_data' ) ) {
87-
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
88-
}
89-
$plugin_data = get_plugin_data( WC_EMAILCHEF_FILE );
90-
91-
return $plugin_data['Version'];
85+
return WC_EMAILCHEF_VERSION;
9286
}
9387

9488
public static function activate() {
@@ -178,7 +172,7 @@ public function enqueue_scripts() {
178172

179173
wp_register_script( 'woocommerce-emailchef-backend-js',
180174
WC_EMAILCHEF_URL . "dist/js/emailchef.min.js", array( 'jquery' ),
181-
self::version() );
175+
WC_EMAILCHEF_VERSION );
182176

183177
wp_localize_script( 'woocommerce-emailchef-backend-js', 'wcec', array(
184178
"namespace" => $this->namespace,
@@ -259,7 +253,7 @@ public function enqueue_scripts() {
259253

260254
wp_register_style( 'woocommerce-emailchef-backend-css',
261255
WC_EMAILCHEF_URL . "dist/css/emailchef.min.css", array(),
262-
self::version() );
256+
WC_EMAILCHEF_VERSION );
263257

264258
wp_enqueue_script( 'woocommerce-emailchef-backend-js' );
265259
wp_enqueue_style( 'woocommerce-emailchef-backend-css' );
@@ -342,20 +336,12 @@ private function add_hooks() {
342336

343337
public function ecwc_plugin_update_check() {
344338

345-
if (!function_exists('get_plugin_data')) {
346-
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
347-
}
348-
349-
350-
/*
351339
$last_run_version = get_option('ecwc_last_run_version', '5.2');
352340

353-
if (version_compare( $last_run_version, self::version(), '<')) {
341+
if (version_compare( $last_run_version, '5.4', '<')) {
354342
self::deactivate();
355-
update_option( 'ecwc_last_run_version', self::version() );
343+
update_option( 'ecwc_last_run_version', WC_EMAILCHEF_VERSION );
356344
}
357-
*/
358-
359345

360346
}
361347

@@ -446,22 +432,6 @@ public function footer_text() {
446432
public function dueclic_copyright() {
447433
add_filter( 'admin_footer_text', array( $this, 'footer_text' ), 11 );
448434
}
449-
450-
/**
451-
* Load translations
452-
*/
453-
454-
public function load_translations() {
455-
$lang_path = dirname( dirname( plugin_basename( __FILE__ ) ) )
456-
. '/languages/';
457-
458-
load_plugin_textdomain(
459-
'emailchef-for-woocommerce',
460-
false,
461-
$lang_path
462-
);
463-
}
464-
465435
/**
466436
* Include libraries
467437
*/
@@ -523,7 +493,6 @@ public function get_api_url() {
523493

524494
public function define_constants() {
525495
// Plugin version
526-
$this->define( "WC_EMAILCHEF_VERSION", self::version() );
527496

528497
// Plugin folder path
529498
$this->define( "WC_EMAILCHEF_DIR",

includes/class-wc-emailchef.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public function delete_integration( $list_id ) {
654654
$integrations = $this->get_integrations($list_id);
655655
foreach ($integrations as $integration) {
656656
if ($integration['id'] == 3 && $integration['website'] == get_home_url()){
657-
$route = "/lists/${list_id}/integrations/${integration["row_id"]}";
657+
$route = "/lists/".$list_id."/integrations/".$integration["row_id"];
658658
$response = $this->json( $route, array(), "DELETE" );
659659
return ( $response["status"] == "OK" );
660660
}
-18.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)