Skip to content

Commit 572acc7

Browse files
Add integration page upsell
1 parent 9d643bd commit 572acc7

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

includes/admin/feedzy-rss-feeds-admin.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -612,19 +612,17 @@ public function feedzy_menu_pages() {
612612
'feedzy_settings_page',
613613
)
614614
);
615-
if ( apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) {
616-
add_submenu_page(
617-
'feedzy-admin-menu',
618-
__( 'Integration', 'feedzy-rss-feeds' ),
619-
__( 'Integration', 'feedzy-rss-feeds' ),
620-
'manage_options',
621-
'feedzy-integration',
622-
array(
623-
$this,
624-
'feedzy_integration_page',
625-
)
626-
);
627-
}
615+
add_submenu_page(
616+
'feedzy-admin-menu',
617+
__( 'Integration', 'feedzy-rss-feeds' ),
618+
__( 'Integration', 'feedzy-rss-feeds' ),
619+
'manage_options',
620+
'feedzy-integration',
621+
array(
622+
$this,
623+
'feedzy_integration_page',
624+
)
625+
);
628626
add_submenu_page(
629627
'feedzy-admin-menu',
630628
__( 'Support', 'feedzy-rss-feeds' ),

includes/admin/feedzy-rss-feeds-import.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,12 +2527,14 @@ public function settings_tabs( $tabs ) {
25272527
*/
25282528
public function integration_tabs( $tabs ) {
25292529
if ( $this->feedzy_is_business() || $this->feedzy_is_agency() ) {
2530-
$tabs['openai'] = __( 'OpenAI', 'feedzy-rss-feeds' );
2530+
$tabs['openai'] = __( 'OpenAI', 'feedzy-rss-feeds' );
25312531
$tabs['openrouter'] = __( 'OpenRouter', 'feedzy-rss-feeds' );
25322532
}
2533-
if ( ! feedzy_is_pro() ) {
2533+
if ( ! feedzy_is_pro() || ! apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) {
25342534
$tabs['openai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'OpenAI', 'feedzy-rss-feeds' ) );
2535-
$tabs['openrouter'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'OpenRouter', 'feedzy-rss-feeds' ) );
2535+
if ( ! isset( $tabs['openrouter'] ) ) {
2536+
$tabs['openrouter'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'OpenRouter', 'feedzy-rss-feeds' ) );
2537+
}
25362538
$tabs['spinnerchief'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'SpinnerChief', 'feedzy-rss-feeds' ) );
25372539
$tabs['amazon-product-advertising'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'Amazon Product Advertising', 'feedzy-rss-feeds' ) );
25382540
$tabs['wordai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'WordAi', 'feedzy-rss-feeds' ) );
@@ -2579,7 +2581,7 @@ private function render_view( $name ) {
25792581
case 'amazon-product-advertising':
25802582
case 'openai':
25812583
case 'openrouter':
2582-
if ( ! feedzy_is_pro() ) {
2584+
if ( ! feedzy_is_pro() || ! apply_filters( 'feedzy_is_license_of_type', false, 'business' ) ) {
25832585
$file = FEEDZY_ABSPATH . '/includes/views/' . $name . '-view.php';
25842586
} else {
25852587
$file = apply_filters( 'feedzy_render_view', $file, $name );

0 commit comments

Comments
 (0)