Skip to content

Commit

Permalink
Merge pull request #57 from pluginever/release/2.0.6
Browse files Browse the repository at this point in the history
Release/2.0.6
  • Loading branch information
devsabbirhossain authored Oct 24, 2024
2 parents d61018c + 67554f3 commit a199b38
Show file tree
Hide file tree
Showing 10 changed files with 301 additions and 46 deletions.
1 change: 1 addition & 0 deletions assets/css/halloween.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions assets/css/halloween.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
.bk-notice {
box-sizing: border-box;

img {
width: 100%;
height: auto;
max-width: 100px;
}

h3 {
margin: 0 0 5px;
}

p:last-child {
margin-bottom: 0;
}

.notice-body {
display: flex;
align-items: center;
padding: 12px 0;
width: 100%;
box-sizing: border-box;
}

.notice-icon {
margin-right: 20px;
width: 64px;
}

.notice-content {
flex: 1;
}

.notice-footer {
border-top: 1px solid #C3C4C7;
padding: 12px 0;
display: flex;
align-items: center;
gap: 20px;

a {
display: flex;
align-items: center;
gap: 5px;
text-decoration: none;

// select href value is only #.
&[href^="#"], &[href=""], &:not([href]) {
color: #8C8F94;
}
}
}
}

.notice.notice-halloween {
position: relative;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border: 1px solid #5900a8;
border-left-width: 4px;
.notice-content {
max-width: 75%;
color: #ffffff;
h3 {
color: #ffffff !important;
font-size: 1.6rem;
line-height: 1.3;
}
p {
font-size: .9rem;
line-height: 1.6;
}
}
.notice-footer {
justify-content: space-between;
border-top: 1px solid #5900a8;
.footer-btn {
display: flex;
gap: 20px;
}
.halloween-upgrade-btn {
background-color: #ffffff;
padding: 5px 12px;
color: #4203A0;
border-radius: 3px;
&:hover{
background-color: #D6CDE4;
}
}
.halloween-remind-btn {
background-color: #FFFFFF52;
padding: 5px 12px;
color: #FFFFFF;
border-radius: 3px;
&:hover{
background-color: #FFFFFF66;
}
}
.halloween-remove-btn {
color: #ffffff;
&:hover{
color: #D6CDE4;
}
}
.halloween-dismiss-btn{
position: absolute;
top: 20px;
right: 30px;
color: #FFFFFF;
&:hover {
color: #D6CDE4;
}
}
.halloween-footer-text {
float: right;
color: #ffffff;
}
}
@media screen and (max-width: 500px ) {
background-position:right;
.notice-body {
align-items: flex-start;
padding-top: 36px;
}
.notice-footer {
flex-direction: column;
.footer-btn {
flex-direction: column;
align-items: center;
gap: 10px;
}
.halloween-dismiss-btn {
top: 8px;
right: 20px;
}
}
}
}
35 changes: 35 additions & 0 deletions assets/images/halloween-banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions assets/images/halloween-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 30 additions & 7 deletions i18n/languages/wc-category-showcase.pot
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (C) 2024 PluginEver
# This file is distributed under the GPL v3 or later.
# This file is distributed under the GPL v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Product Category Showcase for WooCommerce 2.0.5\n"
"Project-Id-Version: Product Category Showcase for WooCommerce 2.0.6\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/wc-category-showcase\n"
"POT-Creation-Date: 2024-10-01 04:41:47+00:00\n"
"POT-Creation-Date: 2024-10-23 11:50:41+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -122,6 +122,29 @@ msgstr ""
msgid "Upgrade To PRO Now"
msgstr ""

#: includes/class-promotion.php:52
msgid "Limited Time Offer! PluginEver Halloween Sale: 30% OFF!!"
msgstr ""

#: includes/class-promotion.php:59
#. translators: 1.Offer Percentage, 2. Coupon Code.
msgid ""
"Spectacular Halloween Deal! Get %1$s on all premium plugins with code %2$s. "
"Don't miss out — this offer vanishes soon! 👻"
msgstr ""

#: includes/class-promotion.php:72
msgid "Claim Your Discount!!"
msgstr ""

#: includes/class-promotion.php:76
msgid "View Our Plugins & Offer"
msgstr ""

#: includes/class-promotion.php:79
msgid "Valid until November 10, 2024"
msgstr ""

#: includes/custom-cp.php:16
msgid "Add New Category Showcase"
msgstr ""
Expand Down Expand Up @@ -172,19 +195,19 @@ msgstr ""
msgid "Example Metabox"
msgstr ""

#: wc-category-showcase.php:373
#: wc-category-showcase.php:374
msgid "View Plugin's Documentation"
msgstr ""

#: wc-category-showcase.php:373
#: wc-category-showcase.php:374
msgid "Documentation"
msgstr ""

#: wc-category-showcase.php:379
#: wc-category-showcase.php:380
msgid "Go Pro"
msgstr ""

#: wc-category-showcase.php:399 wc-category-showcase.php:409
#: wc-category-showcase.php:400 wc-category-showcase.php:410
msgid "Cheatin’ huh?"
msgstr ""

Expand Down
74 changes: 43 additions & 31 deletions includes/class-promotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public function __construct() {
add_action( 'wp_ajax_'.$this->uniq_key.'-dismiss-promotional-offer-notice', array( $this, 'dismiss_promotional_offer' ) );
}


/**
*
* since 1.0.0
Expand All @@ -26,9 +27,12 @@ public function promotional_offer() {
}

// 2018-03-26 23:59:00
// if ( time() > strtotime('30-4-2018') ) {
// return;
// }
$current_time = wp_date( 'U' );
$halloween_time = date_i18n( strtotime( '2024-11-11 00:00:00' ) );
if ( $current_time > $halloween_time ) {
return;
}
wp_enqueue_style( 'plvr-halloween', PLVR_WCCS_ASSETS . '/css/halloween.css', false, PLVR_WCCS_VERSION );

// check if it has already been dismissed
$hide_notice = get_option( ''.$this->uniq_key.'_initial_upsell_promotion', 'no' );
Expand All @@ -38,36 +42,44 @@ public function promotional_offer() {
}

?>
<div class="notice notice-info is-dismissible" id="<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice">
<p>Thank you for installing <strong><a href="https://www.pluginever.com/plugins/woocommerce-category-showcase-pro/" target="_blank">WooCommerce Category Showcase</a></strong>. <strong>WooCommerce Category Showcase</strong> is now powering <strong>1000+</strong> stores. Use the coupon code <strong>SHOWCASEFREETOPRO</strong> for 20% discount on PRO. <a href="https://www.pluginever.com/plugins/woocommerce-category-showcase-pro//?utm_source=plugin_activation_promotion&utm_medium=link&utm_campaign=wc-category-slider&utm_content=Upgrade" target="_blank" style="text-decoration: none;"><span
class="dashicons dashicons-smiley" style="margin-left: 10px;"></span> Get the Offer</a></p>
<span class="dashicons dashicons-megaphone"></span>
<div class="notice bk-notice notice-halloween notice-info is-dismissible" id="<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice" style="background-image: url(<?php echo esc_url( PLVR_WCCS_ASSETS . '/images/halloween-banner.svg' ); ?>);">
<div class="notice-body">
<div class="notice-icon">
<img src="<?php echo esc_url(PLVR_WCCS_ASSETS . '/images/halloween-icon.svg' ); ?>" alt="WC Category Showcase">
</div>
<div class="notice-content">
<h3>
<?php esc_html_e( 'Limited Time Offer! PluginEver Halloween Sale: 30% OFF!!', 'wc-category-showcase' ); ?>
</h3>
<p>
<?php
echo wp_kses_post(
sprintf(
// translators: 1.Offer Percentage, 2. Coupon Code.
__( 'Spectacular Halloween Deal! Get %1$s on all premium plugins with code %2$s. Don\'t miss out — this offer vanishes soon! 👻', 'wc-category-showcase' ),
'<strong>' . esc_attr( '30% OFF' ) . '</strong>',
'<strong>' . esc_attr( 'BIGTREAT30' ) . '</strong>'
)
);
?>
</p>
</div>
</div>
<div class="notice-footer">
<div class="footer-btn">
<a href="<?php echo esc_url( 'https://pluginever.com/plugins/woocommerce-category-showcase-pro?utm_source=plugin&utm_medium=notice&utm_campaign=halloween-2024&discount=bigtreat30' ); ?>" class="primary halloween-upgrade-btn" target="_blank">
<span class="dashicons dashicons-cart"></span>
<?php esc_html_e( 'Claim Your Discount!!', 'wc-category-showcase' ); ?>
</a>
<a href="<?php echo esc_attr( 'https://pluginever.com/plugins' ); ?>" class="halloween-remind-btn" target="_blank">
<span class="dashicons dashicons-megaphone"></span>
<?php esc_html_e( 'View Our Plugins & Offer', 'wc-category-showcase' ); ?>
</a>
</div>
<strong class="halloween-footer-text"><?php esc_html_e( 'Valid until November 10, 2024', 'wc-category-showcase' ); ?></strong>
</div>
</div><!-- #<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice -->

<style>

#<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice p {
color: #000;
font-size: 14px;
margin-bottom: 10px;
-webkit-text-shadow: 0.1px 0.1px 0px rgba(250, 250, 250, 0.24);
-moz-text-shadow: 0.1px 0.1px 0px rgba(250, 250, 250, 0.24);
-o-text-shadow: 0.1px 0.1px 0px rgba(250, 250, 250, 0.24);
text-shadow: 0.1px 0.1px 0px rgba(250, 250, 250, 0.24);
padding-left: 30px;
}


#<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice span.dashicons-megaphone {
position: absolute;
top: 8px;
left: 0;
color: #0073aa;
font-size: 36px;
transform: rotate(-21deg);
}
</style>

<script type='text/javascript'>
jQuery('body').on('click', '#<?php echo esc_attr( $this->uniq_key );?>-promotional-offer-notice .notice-dismiss', function (e) {
e.preventDefault();
Expand Down
3 changes: 2 additions & 1 deletion includes/class-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function shortcode_render_callback( $attr ) {
if ( $attr['id'] == null ) {
return;
}
if ( false === get_post_status( $attr['id'] ) ) {

if ( 'publish' !== get_post_status( $attr['id'] ) ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wc-category-showcase",
"title": "WooCommerce Category Showcase",
"description": "WooCommerce extension to showcase categories in interactive slider blocks.",
"version": "2.0.5",
"version": "2.0.6",
"homepage": "http://pluginever.com/plugins/woocommerce-category-showcase-pro/",
"author": {
"name": "PluginEver",
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Tags: woocommerce, woocommerce Category, woocommerce Category Slide
Requires at least: 5.2
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 2.0.5
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 2.0.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Enhance your WooCommerce store with Product Category Showcase! Engage visitors with a sleek slider, making category browsing effortless.

Expand Down Expand Up @@ -133,6 +133,11 @@ Place the snippet where you want. Change the id with the appropriate one.
4. Created All WooCommerce category showcase

== Changelog ==
= 2.0.6 ( 23th October, 2024 ) =
* Fix - Resolved known issues
* Compatible – Compatibility with WP Latest version
* Compatible – Compatibility with WC Latest version

= 2.0.5 ( 1st October, 2024 ) =
* Fix - Resolved known issues
* Compatible – Compatibility with WP Latest version
Expand Down
Loading

0 comments on commit a199b38

Please sign in to comment.