From 806fadf006b1a8ffacfc5d1170fa44665feb9146 Mon Sep 17 00:00:00 2001 From: devsabbirhossain Date: Sun, 27 Oct 2024 10:11:38 +0600 Subject: [PATCH 1/6] fix notice issue --- src/Admin/Notices.php | 50 ++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/src/Admin/Notices.php b/src/Admin/Notices.php index 74df84c2..8ad56a34 100644 --- a/src/Admin/Notices.php +++ b/src/Admin/Notices.php @@ -38,40 +38,22 @@ public function __construct() { */ public function add_notices() { // Halloween's promotion notice. - if ( ! $this->is_notice_dismissed( 'wc_serial_numbers_halloween_promotion' ) ) { - if ( ! function_exists( 'wc_serial_numbers_pro' ) ) { - $discount_percentage = esc_html__( '30%', 'wc-serial-numbers' ); - $this->notices[] = array( - 'type' => 'info', - 'classes' => 'notice-alt notice-large wcsn-halloween', - 'dismissible' => false, - 'id' => 'wcsn_halloween_promotion', - 'message' => sprintf( - /* translators: %1$s: link to the plugin page, %2$s: Offer content, %3$s: link to the plugin page, %4$s: end link to the plugin page */ - __( '%1$s%2$s%3$s Upgrade Now and Save %4$s', 'wc-serial-numbers' ), - '
WC Serial Numbers Halloween offer
', - '👻 Halloween Sale: ' . $discount_percentage . ' OFF on WC Serial Manager Pro

Grab a ' . $discount_percentage . ' discount on WC Serial Manager Pro and all our premium plugins this Halloween! Use code ‘BIGTREAT30’. Don\'t miss out!

', - '', - $discount_percentage . '
', - ), - ); - } else { - $discount_percentage = esc_html__( '30%', 'wc-serial-numbers' ); - $this->notices[] = array( - 'type' => 'info', - 'classes' => 'notice-alt notice-large wcsn-halloween', - 'dismissible' => true, - 'id' => 'wcsn_halloween_promotion', - 'message' => sprintf( - /* translators: %1$s: link to the plugin page, %2$s: Offer content, %3$s: link to the plugin page, %4$s: end link to the plugin page */ - __( '%1$s%2$s%3$s Claim your discount! %4$s', 'wc-serial-numbers' ), - '
WC Serial Numbers Halloween offer
', - '👻 Halloween Sale: ' . $discount_percentage . ' OFF on All Plugins

Get ' . $discount_percentage . ' OFF on all premium plugins with code ‘BIGTREAT30’. Hurry, this deal won’t last long!

', - '', - '
', - ), - ); - } + if ( ! $this->is_notice_dismissed( 'wcsn_halloween_promotion' ) ) { + $discount_percentage = esc_html__( '30%', 'wc-serial-numbers' ); + $this->notices[] = array( + 'type' => 'info', + 'classes' => 'notice-alt notice-large wcsn-halloween', + 'dismissible' => true, + 'id' => 'wcsn_halloween_promotion', + 'message' => sprintf( + /* translators: %1$s: link to the plugin page, %2$s: Offer content, %3$s: link to the plugin page, %4$s: end link to the plugin page */ + __( '%1$s%2$s%3$s Claim your discount! %4$s', 'wc-serial-numbers' ), + '
WC Serial Numbers Halloween offer
', + '👻 Halloween Sale: ' . $discount_percentage . ' OFF on All Plugins

Get ' . $discount_percentage . ' OFF on all premium plugins with code ‘BIGTREAT30’. Hurry, this deal won’t last long!

', + '', + '
', + ), + ); } $is_outdated_pro = defined( 'WC_SERIAL_NUMBER_PRO_PLUGIN_VERSION' ) && version_compare( WC_SERIAL_NUMBER_PRO_PLUGIN_VERSION, '1.2.1', '<' ); From 7dd1852bc51febfa90617e8b6405178fe9b03f03 Mon Sep 17 00:00:00 2001 From: kawsarahmedr Date: Sun, 27 Oct 2024 10:32:14 +0600 Subject: [PATCH 2/6] Fix wrong notice ID --- src/Admin/Notices.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Admin/Notices.php b/src/Admin/Notices.php index 74df84c2..c6952816 100644 --- a/src/Admin/Notices.php +++ b/src/Admin/Notices.php @@ -38,13 +38,13 @@ public function __construct() { */ public function add_notices() { // Halloween's promotion notice. - if ( ! $this->is_notice_dismissed( 'wc_serial_numbers_halloween_promotion' ) ) { + if ( ! $this->is_notice_dismissed( 'wcsn_halloween_promotion' ) ) { if ( ! function_exists( 'wc_serial_numbers_pro' ) ) { $discount_percentage = esc_html__( '30%', 'wc-serial-numbers' ); $this->notices[] = array( 'type' => 'info', 'classes' => 'notice-alt notice-large wcsn-halloween', - 'dismissible' => false, + 'dismissible' => true, 'id' => 'wcsn_halloween_promotion', 'message' => sprintf( /* translators: %1$s: link to the plugin page, %2$s: Offer content, %3$s: link to the plugin page, %4$s: end link to the plugin page */ From 74dac3b1164a88287541944ab30beda843b281e2 Mon Sep 17 00:00:00 2001 From: kawsarahmedr Date: Sun, 27 Oct 2024 10:40:16 +0600 Subject: [PATCH 3/6] Fix #449 --- wc-serial-numbers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wc-serial-numbers.php b/wc-serial-numbers.php index 0879fb37..efb6b966 100644 --- a/wc-serial-numbers.php +++ b/wc-serial-numbers.php @@ -3,7 +3,7 @@ * Plugin Name: WC Serial Numbers * Plugin URI: https://pluginever.com/plugins/wocommerce-serial-numbers-pro/ * Description: Sell and manage license keys/ serial numbers/ secret keys easily within your WooCommerce store. - * Version: 2.0.8 + * Version: 2.0.9 * Requires at least: 5.0 * Requires PHP: 7.4 * Author: PluginEver From 6b372ea79c84798cb79afffedb18573bf835e384 Mon Sep 17 00:00:00 2001 From: kawsarahmedr Date: Sun, 27 Oct 2024 10:40:57 +0600 Subject: [PATCH 4/6] Update readme --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 86fbcfd9..69d4a8b0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: license, license manager, serial number, serial key, woocommerce Requires at least: 5.0 Tested up to: 6.6 Requires PHP: 7.4 -Stable tag: 2.0.8 +Stable tag: 2.0.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From 5def86efa67ab39c534f2af661b5c0b699cd9930 Mon Sep 17 00:00:00 2001 From: kawsarahmedr Date: Sun, 27 Oct 2024 10:41:17 +0600 Subject: [PATCH 5/6] Update package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 175744c5..32cec39c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wc-serial-numbers", "title": "WC Serial Numbers", - "version": "2.0.8", + "version": "2.0.9", "description": "Sell and manage license keys/ serial numbers/ secret keys easily within your WooCommerce store.", "homepage": "https://pluginever.com/plugins/woocommerce-serial-numbers-pro/", "license": "GPL v2 or later", From 824a8aecefbece239e525d3263f0d3ea5ed1e609 Mon Sep 17 00:00:00 2001 From: kawsarahmedr Date: Sun, 27 Oct 2024 10:41:50 +0600 Subject: [PATCH 6/6] Update pot file --- languages/wc-serial-numbers.pot | 4 ++-- package-lock.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/languages/wc-serial-numbers.pot b/languages/wc-serial-numbers.pot index b462cb6b..a5f95f48 100644 --- a/languages/wc-serial-numbers.pot +++ b/languages/wc-serial-numbers.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WC Serial Numbers 2.0.8\n" +"Project-Id-Version: WC Serial Numbers 2.0.9\n" "Report-Msgid-Bugs-To: https://pluginever.com/support\n" -"POT-Creation-Date: 2024-10-24 11:47:50+00:00\n" +"POT-Creation-Date: 2024-10-27 04:41:41+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/package-lock.json b/package-lock.json index 03944a47..bf0cedf1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wc-serial-numbers", - "version": "2.0.8", + "version": "2.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wc-serial-numbers", - "version": "2.0.8", + "version": "2.0.9", "license": "GPL v2 or later", "devDependencies": { "@lodder/time-grunt": "^4.0.0",