Skip to content

Commit

Permalink
My Jetpack: fix postCheckoutUrl in product interstitial component (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller authored Aug 19, 2024
1 parent 290118d commit 6920fe8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ export default function ProductInterstitial( {

const clickHandler = useCallback(
( checkout, product, tier ) => {
let postCheckoutUrl = product?.postCheckoutUrl
? product?.postCheckoutUrl
: myJetpackCheckoutUri;

ctaCallback?.( { slug, product, tier } );

if ( product?.isBundle || directCheckout ) {
Expand All @@ -146,10 +142,8 @@ export default function ProductInterstitial( {
activate(
{ productId: slug },
{
onSettled: ( { productId: activatedProduct } ) => {
postCheckoutUrl = activatedProduct?.post_checkout_url
? activatedProduct.post_checkout_url
: myJetpackCheckoutUri;
onSettled: activatedProduct => {
const postCheckoutUrl = activatedProduct?.post_checkout_url || myJetpackCheckoutUri;
// there is a separate hasRequiredTier, but it is not implemented
const hasPaidPlanForProduct = product?.hasPaidPlanForProduct;
const isFree = tier
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

My Jetpack: ensure product screens redirect to the correct post-checkout URLs.

0 comments on commit 6920fe8

Please sign in to comment.