From 748e8789007735a3c38d0e027d06c628397b4194 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 14 Aug 2025 15:40:24 +0530 Subject: [PATCH 1/8] feat: allow more option in feedzy free --- css/settings.css | 2 +- includes/admin/feedzy-rss-feeds-import.php | 7 ++- includes/views/import-metabox-edit.php | 17 +++---- js/Conditions/ConditionsControl.js | 19 +++---- js/FeedzyBlock/inspector.js | 59 ++++++++++++---------- js/FeedzyLoop/controls.js | 7 +-- js/FeedzyLoop/editor.scss | 8 +-- tests/e2e/specs/upsell.spec.js | 24 +++++---- 8 files changed, 73 insertions(+), 70 deletions(-) diff --git a/css/settings.css b/css/settings.css index 84af6c2b3..4a0719360 100644 --- a/css/settings.css +++ b/css/settings.css @@ -2512,7 +2512,7 @@ li.draggable-item .components-panel__body-toggle.components-button{ padding: 24px 0; } -.fz-condition-control.is-upsell { +.is-upsell { opacity: 0.6; } diff --git a/includes/admin/feedzy-rss-feeds-import.php b/includes/admin/feedzy-rss-feeds-import.php index 28c305c31..a343ce729 100644 --- a/includes/admin/feedzy-rss-feeds-import.php +++ b/includes/admin/feedzy-rss-feeds-import.php @@ -563,12 +563,11 @@ public function feedzy_import_feed_options() { $inherited_thumbnail_id = ! empty( $this->free_settings['general']['default-thumbnail-id'] ) ? (int) $this->free_settings['general']['default-thumbnail-id'] : 0; if ( feedzy_is_pro() ) { $default_thumbnail_id = get_post_meta( $post->ID, 'default_thumbnail_id', true ); + $import_schedule = array( + 'fz_cron_schedule' => ! empty( $this->free_settings['general']['fz_cron_schedule'] ) ? $this->free_settings['general']['fz_cron_schedule'] : '', + ); } - $import_schedule = array( - 'fz_cron_schedule' => ! empty( $this->free_settings['general']['fz_cron_schedule'] ) ? $this->free_settings['general']['fz_cron_schedule'] : '', - ); - $fz_cron_schedule = get_post_meta( $post->ID, 'fz_cron_schedule', true ); if ( ! empty( $fz_cron_schedule ) ) { $import_schedule['fz_cron_schedule'] = $fz_cron_schedule; diff --git a/includes/views/import-metabox-edit.php b/includes/views/import-metabox-edit.php index 4573ea279..059bdd8d2 100644 --- a/includes/views/import-metabox-edit.php +++ b/includes/views/import-metabox-edit.php @@ -106,11 +106,11 @@ class="dashicons dashicons-arrow-down-alt2"> -
+
@@ -630,15 +630,14 @@ class="fz-switch-toggle" type="checkbox" value="yes"
-
- +
-

PRO' : ''; ?>

+

- @@ -674,11 +674,10 @@ class="fz-switch-toggle" type="checkbox" value="yes"
-
- +

- PRO' : ''; ?> +

diff --git a/js/Conditions/ConditionsControl.js b/js/Conditions/ConditionsControl.js index 14406d3a6..b033767c1 100644 --- a/js/Conditions/ConditionsControl.js +++ b/js/Conditions/ConditionsControl.js @@ -17,6 +17,7 @@ import { Icon, plus } from '@wordpress/icons'; */ import PanelTab from './PanelTab'; import DateTimeControl from './DateTimeControl'; +import { cond } from 'lodash'; const SUPPORTED_FIELDS = [ { @@ -70,6 +71,10 @@ const ConditionsControl = ({ conditions, setConditions }) => { }; const addCondition = () => { + if (!isPro && 1 <= conditions.conditions.length) { + return; + } + const conditionsCopy = [...conditions.conditions]; conditionsCopy.push({ @@ -122,9 +127,7 @@ const ConditionsControl = ({ conditions, setConditions }) => { return (
{ }, ]} onChange={onChangeMatch} - disabled={!isPro} /> {conditions.conditions.map((condition, index) => { @@ -165,7 +167,6 @@ const ConditionsControl = ({ conditions, setConditions }) => { onChange={(value) => onChangeCondition(index, value, 'field') } - disabled={!isPro} /> { onChange={(value) => onChangeCondition(index, value, 'operator') } - disabled={!isPro} /> {!['has_value', 'empty'].includes( @@ -209,7 +209,6 @@ const ConditionsControl = ({ conditions, setConditions }) => { 'value' ) } - disabled={!isPro} /> ) : ( { 'value' ) } - disabled={!isPro} /> )} @@ -231,7 +229,10 @@ const ConditionsControl = ({ conditions, setConditions }) => { ); })} -
+
+ +
-
+ { modalOpen && +
+
+ +
+

+ { __( 'Upgrade to Use Unlimited Conditions', 'feedzy-rss-feeds' ) } +

+

+ { __( 'Filter Condition limit reached', 'feedzy-rss-feeds' ) } + + {/* translators: %1$s is the number of imports used, %2$s is the total number of imports allowed. */} + { __( '(' + sprintf( __( '%1$s/%2$s used', 'feedzy-rss-feeds' ), '1', '1' ) + ')' ) } + +

+
+
+

+ { __( 'Your current plan supports only one filter condition. Upgrade to unlock unlimited import configurations and make the most of Feedzy\'s powerful features!', 'feedzy-rss-feeds' ) } +

+
+
+ + + { __( '30-day money-back guarantee. No questions asked.', 'feedzy-rss-feeds' ) } + +
+
+
+ } + ); }; From 493daae5cb0889fdb7b8c1e87313ab1361607398 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 14 Aug 2025 18:29:45 +0530 Subject: [PATCH 3/8] fix: js lint --- js/Conditions/ConditionsControl.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/js/Conditions/ConditionsControl.js b/js/Conditions/ConditionsControl.js index 3c0181dfe..60dc7f66e 100644 --- a/js/Conditions/ConditionsControl.js +++ b/js/Conditions/ConditionsControl.js @@ -271,8 +271,15 @@ const ConditionsControl = ({ conditions, setConditions }) => {

{ __( 'Filter Condition limit reached', 'feedzy-rss-feeds' ) } - {/* translators: %1$s is the number of imports used, %2$s is the total number of imports allowed. */} - { __( '(' + sprintf( __( '%1$s/%2$s used', 'feedzy-rss-feeds' ), '1', '1' ) + ')' ) } + { + '(' + + sprintf( + // translators: %1$s is the number of imports used, %2$s is the total number of imports allowed. + __( '%1$s/%2$s used', 'feedzy-rss-feeds'), + '1', + '1' ) + + ')' + }

@@ -285,7 +292,7 @@ const ConditionsControl = ({ conditions, setConditions }) => {
{ __( 'Upgrade to PRO', 'feedzy-rss-feeds' ) } From 88829a7b443c0ff227e917fea15f53490e2fbfb6 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Mon, 18 Aug 2025 19:10:42 +0530 Subject: [PATCH 4/8] fix: feed filter condition --- includes/admin/feedzy-rss-feeds-admin.php | 4 ---- includes/util/feedzy-rss-feeds-conditions.php | 4 ---- js/Conditions/ConditionsControl.js | 9 +++++++-- js/Conditions/index.js | 13 ++----------- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/includes/admin/feedzy-rss-feeds-admin.php b/includes/admin/feedzy-rss-feeds-admin.php index 65a466396..296d26b6b 100644 --- a/includes/admin/feedzy-rss-feeds-admin.php +++ b/includes/admin/feedzy-rss-feeds-admin.php @@ -486,10 +486,6 @@ function closeModal(e) { if (e.key === "Escape") closeModal(); }); - jQuery('.fz-conditions').on('click', '.fz-action-btn.is-upsell', function (event) { - openModal('#feedzy-add-filter-condition'); - event.preventDefault(); - }); });