Skip to content

Commit

Permalink
fix issue in expired subs
Browse files Browse the repository at this point in the history
  • Loading branch information
manzurahammed committed Apr 30, 2024
1 parent e8faba9 commit 6c6a1cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/woocommerce/src/Admin/PluginsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ public static function get_expiring_subscription_notice( $allowed_link = true )
if ( !WC_Helper::is_site_connected() ) {
return [];
}

$is_notice_dismiss = get_user_meta( get_current_user_id(), self::DISMISS_EXPIRING_SUBS_NOTICE, true );
if ( !empty( $is_notice_dismiss ) ) {
return [];
Expand Down Expand Up @@ -775,7 +774,7 @@ public static function get_expired_subscription_notice( $allowed_link = true ) {
$expired_subscriptions = array_filter(
$subscriptions,
function ( $sub ) {
return $sub[ 'expired' ] && !$sub[ 'lifetime' ];
return $sub[ 'expired' ] && !$sub[ 'lifetime' ] && $sub['product_key'];
},
);

Expand All @@ -791,7 +790,7 @@ function ( $sub ) {
$total_expired_subscriptions,
[
/* translators: 1) product name 2) expiry date 3) URL to My Subscriptions page */
'single_manage' => __( 'Your subscription for <strong>%1$s</strong> expired <a href="%3$s" >Renew for %4$s</a> to continue receiving updates and streamlined support', 'woocommerce' ),
'single_manage' => __( 'Your subscription for <strong>%1$s</strong> expired. <a href="%3$s" >Renew for %4$s</a> to continue receiving updates and streamlined support', 'woocommerce' ),
/* translators: 1) product name 2) expiry date 3) URL to My Subscriptions page */
'multiple_manage' => __( 'One of your subscriptions for <strong>%1$s</strong> has expired. <a href="%3$s">Renew for %4$s.</a> to continue receiving updates and streamlined support', 'woocommerce' ),
/* translators: 1) total expired subscriptions 2) URL to My Subscriptions page */
Expand Down

0 comments on commit 6c6a1cb

Please sign in to comment.