WPSEO_Shortlinker::get( 'https://yoa.st/zz' ), 'infoUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/zy' ), 'title' => 'Yoast SEO Premium', /* translators: %1$s expands to Yoast SEO */ 'desc' => sprintf( __( 'The premium version of %1$s with more features & support.', 'wordpress-seo' ), 'Yoast SEO' ), 'image' => plugin_dir_url( WPSEO_FILE ) . 'packages/js/images/Yoast_SEO_Icon.svg', 'benefits' => [], ]; $extensions = []; // Add Yoast WooCommerce SEO when WooCommerce is active. if ( YoastSEO()->helpers->woocommerce->is_active() ) { $extensions[ WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ] = [ 'buyUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/zr' ), 'infoUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/zq' ), 'title' => 'Yoast WooCommerce SEO', 'display_title' => __( 'Drive more traffic to your online store', 'wordpress-seo' ), /* translators: %1$s expands to Yoast SEO */ 'desc' => sprintf( __( 'Seamlessly integrate WooCommerce with %1$s and get extra features!', 'wordpress-seo' ), 'Yoast SEO' ), 'image' => plugins_url( 'images/woo_plugin_assistant.svg?v=' . WPSEO_VERSION, WPSEO_FILE ), 'benefits' => [ __( 'Write product pages that rank using the SEO analysis', 'wordpress-seo' ), __( 'Increase Google clicks with rich results', 'wordpress-seo' ), __( 'Add global identifiers for variable products', 'wordpress-seo' ), /* translators: %1$s expands to Yoast SEO, %2$s expands to WooCommerce */ sprintf( __( 'Seamless integration between %1$s and %2$s', 'wordpress-seo' ), 'Yoast SEO', 'WooCommerce' ), __( 'Turn more visitors into customers!', 'wordpress-seo' ), ], 'buy_button' => 'WooCommerce SEO', ]; } // The total number of plugins to consider is the length of the array + 1 for Premium. // @phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $number_plugins_total = count( $extensions ); // @phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $number_plugins_active = 0; $addon_manager = new WPSEO_Addon_Manager(); $has_valid_premium_subscription = YoastSEO()->helpers->product->is_premium() && $addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG ); /* translators: %1$s expands to Yoast SEO. */ $wpseo_extensions_header = sprintf( __( '%1$s Extensions', 'wordpress-seo' ), 'Yoast SEO' ); $new_tab_message = sprintf( '%1$s', /* translators: Hidden accessibility text. */ esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) ); $sale_badge = ''; $premium_sale_badge = ''; if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) { /* translators: %1$s expands to opening span, %2$s expands to closing span */ $sale_badge_span = sprintf( esc_html__( '%1$s30%% OFF%2$s', 'wordpress-seo' ), '', '' ); $sale_badge = '
' . $sale_badge_span . '
'; $premium_sale_badge = ( $has_valid_premium_subscription ) ? '' : $sale_badge; } ?>

  • ', '' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>
  • ', '' ); ?>
is_installed( WPSEO_Addon_Manager::PREMIUM_SLUG ) ) : ?>
'; ?>

= 1 ) : ?>

', '', 'Yoast SEO' ); ?>

$extension ) : // Skip the "All the plugins" card if the user has already all the plugins active. if ( $slug === 'yoast-seo-plugin-subscription' && $number_plugins_active === $number_plugins_total ) { continue; } ?>
has_valid_subscription( $slug ) || ! $addon_manager->is_installed( $slug ) ) : ?>

is_installed( $slug ) ) : ?>
has_valid_subscription( $slug ) ) : ++$number_plugins_active; ?>
'; ?>