getPaymentMethodText(); $nextRetryAt = isset($next_retry_at) ? $next_retry_at : null; $formattedRetryDate = $nextRetryAt ? date_i18n(get_option('date_format'), strtotime($nextRetryAt)) : ''; // getCustomerDashboardUrl() returns a broken relative path ("/subscription/{uuid}") // when no customer profile page is configured — only render the CTA when the // dashboard base actually exists. $updateMethodUrl = (new \FluentCart\Api\StoreSettings())->getCustomerProfilePage() ? \FluentCart\App\Services\URL::getCustomerDashboardUrl('subscription/' . $subscription->uuid) : ''; // Admin preview renders this template with stand-in objects, not persisted // models — isExhausted() type-hints Order, so gate the call on a real model. $payNowAllowed = ($order instanceof \FluentCart\App\Models\Order) && \FluentCart\App\Modules\Subscriptions\Services\SystemChargeService::isExhausted($subscription, $order); ?>
customer->full_name) ); ?>
item_name ), esc_html( $paymentMethodText ) ); } else { printf( /* translators: %1$s is the subscription item name */ esc_html__( 'We were unable to charge your saved payment method for the renewal of %1$s.', 'fluent-cart' ), esc_html( $subscription->item_name ) ); } ?>
' . esc_html( $error ) . '' ); ?>
' . esc_html( $formattedRetryDate ) . '' ); } else { printf( /* translators: %1$s is the date of the next automatic charge attempt */ esc_html__( 'We will automatically try again on %1$s. To avoid any interruption, you can pay now.', 'fluent-cart' ), '' . esc_html( $formattedRetryDate ) . '' ); } } elseif ($updateMethodUrl) { esc_html_e( 'Please pay now or update your payment method from your account to keep your subscription active.', 'fluent-cart' ); } else { esc_html_e( 'Please pay now to keep your subscription active.', 'fluent-cart' ); } } elseif ($formattedRetryDate) { if ($updateMethodUrl) { printf( /* translators: %1$s is the date of the next automatic charge attempt */ esc_html__( 'We will automatically try again on %1$s. You can update your payment method from your account if it has changed.', 'fluent-cart' ), '' . esc_html( $formattedRetryDate ) . '' ); } else { printf( /* translators: %1$s is the date of the next automatic charge attempt */ esc_html__( 'We will automatically try again on %1$s.', 'fluent-cart' ), '' . esc_html( $formattedRetryDate ) . '' ); } } elseif ($updateMethodUrl) { esc_html_e( 'We will automatically try again shortly. You can update your payment method from your account if it has changed.', 'fluent-cart' ); } else { esc_html_e( 'We will automatically try again shortly.', 'fluent-cart' ); } ?>
' . esc_html__( 'Update your payment method', 'fluent-cart' ) . '' ); ?>