Skip to content

Commit

Permalink
Merge branch 'add/mj-expired-products-cards' into add/redbubble_for_e…
Browse files Browse the repository at this point in the history
…xpired_products
  • Loading branch information
elliottprogrammer committed Nov 26, 2024
2 parents 184802c + 210caad commit d52ab18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ActionButton: FC< ActionButtonProps > = ( {
const [ isDropdownOpen, setIsDropdownOpen ] = useState( false );
const [ currentAction, setCurrentAction ] = useState< ComponentProps< typeof Button > >( {} );
const { detail } = useProduct( slug );
const { manageUrl, purchaseUrl, managePaidPlanPurchaseUrl } = detail;
const { manageUrl, purchaseUrl, managePaidPlanPurchaseUrl, renewPaidPlanPurchaseUrl } = detail;
const isManageDisabled = ! manageUrl;
const dropdownRef = useRef( null );
const chevronRef = useRef( null );
Expand Down Expand Up @@ -191,7 +191,7 @@ const ActionButton: FC< ActionButtonProps > = ( {
case PRODUCT_STATUSES.EXPIRING_SOON:
return {
...buttonState,
href: managePaidPlanPurchaseUrl,
href: renewPaidPlanPurchaseUrl,
variant: 'primary',
label: __( 'Renew my plan', 'jetpack-my-jetpack' ),
...( primaryActionOverride &&
Expand Down Expand Up @@ -228,6 +228,7 @@ const ActionButton: FC< ActionButtonProps > = ( {
primaryActionOverride,
isOwned,
managePaidPlanPurchaseUrl,
renewPaidPlanPurchaseUrl,
] );

const allActions = useMemo(
Expand Down
1 change: 1 addition & 0 deletions projects/packages/my-jetpack/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ interface Window {
post_activation_url: string;
post_checkout_url?: string;
manage_paid_plan_purchase_url?: string;
renew_paid_plan_purchase_url?: string;
pricing_for_ui?: {
available: boolean;
wpcom_product_slug: string;
Expand Down

0 comments on commit d52ab18

Please sign in to comment.