Skip to content

Commit

Permalink
Fix incorrect UTM campaign name issue Codeinwp/feedzy-rss-feeds-pro#660
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Jan 19, 2024
1 parent 0bc0b68 commit b65580f
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 30 deletions.
4 changes: 2 additions & 2 deletions includes/admin/feedzy-rss-feeds-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ public function upsell_class( $class ) {
* @since ?
* @access public
*/
public function upsell_content( $content ) {
public function upsell_content( $contentt, $area, $location ) {
if ( ! feedzy_is_pro() ) {
$content = '
<div class="only-pro-content">
<div class="only-pro-container">
<div class="only-pro-inner upgrade-alert">
' . __( 'This feature is available in the Pro version. Unlock more features, by', 'feedzy-rss-feeds' ) . '
<a target="_blank" href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'upsell-content', 'import' ) . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '</a>
<a target="_blank" href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, $area, $location ) . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '</a>
</div>
</div>
</div>';
Expand Down
2 changes: 1 addition & 1 deletion includes/feedzy-rss-feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private function define_admin_hooks() {

$plugin_import = new Feedzy_Rss_Feeds_Import( self::$instance->get_plugin_name(), self::$instance->get_version() );
self::$instance->loader->add_action( 'feedzy_upsell_class', $plugin_import, 'upsell_class', 10, 1 );
self::$instance->loader->add_action( 'feedzy_upsell_content', $plugin_import, 'upsell_content', 10, 1 );
self::$instance->loader->add_action( 'feedzy_upsell_content', $plugin_import, 'upsell_content', 10, 3 );
self::$instance->loader->add_action( 'admin_enqueue_scripts', $plugin_import, 'enqueue_styles' );
self::$instance->loader->add_action( 'init', $plugin_import, 'register_import_post_type', 9, 1 );
self::$instance->loader->add_action( 'add_meta_boxes', $plugin_import, 'add_feedzy_import_metaboxes', 1, 2 );
Expand Down
4 changes: 2 additions & 2 deletions includes/gutenberg/build/block.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/views/amazon-product-advertising-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="form-block">
<div class="upgrade-alert mb-24">
<?php
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), FEEDZY_UPSELL_LINK ) );
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), tsdk_utmify( FEEDZY_UPSELL_LINK, 'amazonproductadvertising' ) ) );
?>
</div>
<div class="locked-form-block">
Expand Down
16 changes: 8 additions & 8 deletions includes/views/import-metabox-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class="dashicons dashicons-arrow-down-alt2"></span>
<div class="feedzy-accordion-item__content border-top">
<div class="fz-form-wrap">
<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'filter-keyword', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Filter by Keyword(s)', 'feedzy-rss-feeds' ); ?><?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
<div class="form-block-pro-text">
Expand Down Expand Up @@ -179,7 +179,7 @@ class="dashicons dashicons-arrow-down-alt2"></span>
</div>

<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'exclude-items', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Exclude Items', 'feedzy-rss-feeds' ); ?><?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
</div>
Expand Down Expand Up @@ -222,7 +222,7 @@ class="dashicons dashicons-arrow-down-alt2"></span>
</div>

<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'filter-time-range', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Filter by Time Range', 'feedzy-rss-feeds' ); ?><?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
</div>
Expand Down Expand Up @@ -539,7 +539,7 @@ class="fz-switch-toggle" type="checkbox" value="yes"
</div>

<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'post-author', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Post Author', 'feedzy-rss-feeds' ); ?> <?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
</div>
Expand Down Expand Up @@ -610,15 +610,15 @@ class="fz-switch-toggle" type="checkbox" value="yes"
<?php if ( ! feedzy_is_pro() ) : ?>
<div class="upgrade-alert">
<?php
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'upgradealert' ) . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'post-excerpt', 'import' ) . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
?>
</div>
<?php endif; ?>
</div>
</div>

<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'custom-fields', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Custom Fields', 'feedzy-rss-feeds' ); ?> <?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
<div class="form-block-pro-text">
Expand Down Expand Up @@ -686,7 +686,7 @@ class="fz-switch-toggle" type="checkbox" value="yes"
<div class="feedzy-accordion-item__content border-top">
<div class="fz-form-wrap">
<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'auto-delete', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Auto-Delete', 'feedzy-rss-feeds' ); ?> <?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
</div>
Expand Down Expand Up @@ -736,7 +736,7 @@ class="fz-switch-toggle" type="checkbox" value="yes"
</div>
</div>
<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '' ) ); ?>
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'fallback-imaget', 'import' ) ); ?>
<div class="left">
<h4 class="h4"><?php esc_html_e( 'Fallback Image', 'feedzy-rss-feeds' ); ?> <?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
</div>
Expand Down
19 changes: 10 additions & 9 deletions js/ActionPopup/SortableItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ import {

const DragHandle = sortableHandle(() => <Icon icon={dragHandle} size={18} className="components-panel__icon" />);

const UpgradeNotice = ({higherPlanNotice}) => {
const UpgradeNotice = ({higherPlanNotice, utmCampaign}) => {
const upsellLink = `https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=import&utm_campaign=${utmCampaign}&utm_content=feedzy-rss-feeds`;
if ( feedzyData.isPro ) {
if ( higherPlanNotice ) {
return(
<>
<div className="fz-notice-wrap">
<Notice status="info" isDismissible={false} className="fz-upgrade-notice"><p><span>PRO</span> {__('This action requires an upgrade to a higher plan.', 'feedzy-rss-feeds')}</p> <ExternalLink href="https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=import&utm_campaign=upsell-content&utm_content=feedzy-rss-feeds">{ __( 'Upgrade Feedzy PRO Plan', 'feedzy-rss-feeds' ) }</ExternalLink></Notice>
<Notice status="info" isDismissible={false} className="fz-upgrade-notice"><p><span>PRO</span> {__('This action requires an upgrade to a higher plan.', 'feedzy-rss-feeds')}</p> <ExternalLink href={upsellLink}>{ __( 'Upgrade Feedzy PRO Plan', 'feedzy-rss-feeds' ) }</ExternalLink></Notice>
</div>
</>
);
Expand All @@ -47,7 +48,7 @@ const UpgradeNotice = ({higherPlanNotice}) => {
return(
<>
<div className="fz-notice-wrap">
<Notice status="info" isDismissible={false} className="fz-upgrade-notice"><p><span>PRO</span> {__('This action is a Premium feature.', 'feedzy-rss-feeds')}</p> <ExternalLink href="https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=import&utm_campaign=upsell-content&utm_content=feedzy-rss-feeds">{ __( 'Upgrade to Feedzy PRO', 'feedzy-rss-feeds' ) }</ExternalLink></Notice>
<Notice status="info" isDismissible={false} className="fz-upgrade-notice"><p><span>PRO</span> {__('This action is a Premium feature.', 'feedzy-rss-feeds')}</p> <ExternalLink href={upsellLink}>{ __( 'Upgrade to Feedzy PRO', 'feedzy-rss-feeds' ) }</ExternalLink></Notice>
</div>
</>
);
Expand Down Expand Up @@ -141,7 +142,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
<li className="fz-action-control" data-counter={counter}>
<div className="fz-action-event">
<PanelBody title={ __( 'Paraphrase with Feedzy', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-paraphrase-feedzy"/>
</PanelBody>
</div>
<div className="fz-trash-action">
Expand All @@ -162,7 +163,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
<PanelBody title={ __( 'Paraphrase with ChatGPT', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false }>
<PanelRow>
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-paraphrase-chatgpt"/>
<BaseControl>
<TextareaControl
label={ __( 'Main Prompt', 'feedzy-rss-feeds' ) }
Expand Down Expand Up @@ -192,7 +193,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
<div className="fz-action-event">
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
<PanelBody title={ __( 'Summarize with ChatGPT', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-summarize-chatgpt"/>
</PanelBody>
</div>
<div className="fz-trash-action">
Expand All @@ -211,7 +212,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
<li className="fz-action-control" data-counter={counter}>
<div className="fz-action-event">
<PanelBody title={ __( 'Translate with Feedzy', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan} utmCampaign="action-translate-feedzy"/>
</PanelBody>
</div>
<div className="fz-trash-action">
Expand All @@ -231,7 +232,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
<div className="fz-action-event">
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.spinnerChiefStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=spinnerchief"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
<PanelBody title={ __( 'Spin using SpinnerChief', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan} utmCampaign="action-spinnerchief"/>
</PanelBody>
</div>
<div className="fz-trash-action">
Expand All @@ -251,7 +252,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
<div className="fz-action-event">
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.wordaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=wordai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
<PanelBody title={ __( 'Spin using WordAI', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan}/>
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan} utmCampaign="action-wordai"/>
</PanelBody>
</div>
<div className="fz-trash-action">
Expand Down
4 changes: 2 additions & 2 deletions js/ActionPopup/action-popup.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/FeedBack/feedback.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions js/Onboarding/import-onboarding.min.js

Large diffs are not rendered by default.

0 comments on commit b65580f

Please sign in to comment.