Skip to content

Commit

Permalink
Remove halloween notice
Browse files Browse the repository at this point in the history
  • Loading branch information
kawsarahmedr committed Dec 3, 2024
1 parent aef5140 commit 0cdc46c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 64 deletions.
24 changes: 0 additions & 24 deletions assets/css/halloween.scss

This file was deleted.

2 changes: 0 additions & 2 deletions src/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public function init() {
* @since 1.0.0
*/
public function enqueue_scripts( $hook ) {
WCSN()->enqueue_style( 'wcsn-halloween', 'css/admin-halloween.css' );

if ( ! in_array( $hook, self::get_screen_ids(), true ) ) {
return;
}
Expand Down
37 changes: 0 additions & 37 deletions src/Admin/Notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,43 +37,6 @@ public function __construct() {
* @since 1.0.0
*/
public function add_notices() {
// Halloween's promotion notice.
if ( ! $this->is_notice_dismissed( 'wcsn_halloween_promotion_24' ) ) {
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' => true,
'id' => 'wcsn_halloween_promotion_24',
'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' ),
'<div class="wcsn-halloween__header"><div class="wcsn-halloween__icon"><img src="' . WCSN()->get_dir_url( 'assets/dist/images/halloween-icon.svg' ) . '" alt="WC Serial Numbers Halloween offer"></div><div class="wcsn-halloween__content"><strong class="wcsn-halloween__title">',
'👻 Halloween Sale: ' . $discount_percentage . ' OFF on WC Serial Numbers Pro</strong><p>Grab a ' . $discount_percentage . ' discount on WC Serial Numbers Pro and all our premium plugins this Halloween! Use code <strong>‘BIGTREAT30’</strong>. Don\'t miss out!</p>',
'<a class="button button-primary" href="' . esc_url( WCSN()->get_premium_url() ) . '?utm_source=plugin&utm_medium=notice&utm_campaign=halloween-2024&discount=bigtreat30" target="_blank">',
$discount_percentage . '</a></div></div>',
),
);
} 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_24',
'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' ),
'<div class="wcsn-halloween__header"><div class="wcsn-halloween__icon"><img src="' . WCSN()->get_dir_url( 'assets/dist/images/halloween-icon.svg' ) . '" alt="WC Serial Numbers Halloween offer"></div><div class="wcsn-halloween__content"><strong class="wcsn-halloween__title">',
'👻 Halloween Sale: ' . $discount_percentage . ' OFF on All Plugins</strong><p>Get ' . $discount_percentage . ' OFF on all premium plugins with code <strong>‘BIGTREAT30’</strong>. Hurry, this deal won’t last long!</p>',
'<a class="button button-primary" href="' . esc_url( 'https://pluginever.com/plugins/?utm_source=plugin&utm_medium=notice&utm_campaign=halloween-2024&discount=bigtreat30' ) . '" target="_blank">',
'</a></div></div>',
),
);
}
}

$is_outdated_pro = defined( 'WC_SERIAL_NUMBER_PRO_PLUGIN_VERSION' ) && version_compare( WC_SERIAL_NUMBER_PRO_PLUGIN_VERSION, '1.2.1', '<' );
if ( ! $is_outdated_pro ) {
$is_outdated_pro = function_exists( 'wc_serial_numbers_pro' ) && is_callable( array( 'wc_serial_numbers_pro', 'get_version' ) ) && wc_serial_numbers_pro()->get_version() && version_compare( wc_serial_numbers_pro()->get_version(), '1.2.1', '<' );
Expand Down
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
'js/admin-script': './assets/js/admin-script.js',
'js/frontend-script': './assets/js/frontend-script.js',
'css/admin-style': './assets/css/admin-style.scss',
'css/admin-halloween': './assets/css/halloween.scss',
'css/frontend-style': './assets/css/frontend-style.scss',
},
output: {
Expand Down

0 comments on commit 0cdc46c

Please sign in to comment.