Skip to content

Commit

Permalink
Add saas plugin support on redirect to the Thank You page (Automattic…
Browse files Browse the repository at this point in the history
  • Loading branch information
WBerredo authored Jun 6, 2023
1 parent 4acd09a commit 7154ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client/my-sites/checkout/get-thank-you-page-url/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,10 @@ function getFallbackDestination( {
cart?.products?.filter( ( product ) => product?.extra?.is_marketplace_product ) || [];

const marketplacePluginSlugs = marketplaceProducts
.filter( ( { extra } ) => extra.product_type === 'marketplace_plugin' )
.filter(
( { extra } ) =>
extra.product_type === 'marketplace_plugin' || extra.product_type === 'saas_plugin'
)
.map( ( { extra } ) => extra.product_slug );

const marketplaceThemeSlugs = marketplaceProducts
Expand Down
2 changes: 1 addition & 1 deletion packages/shopping-cart/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export interface ResponseCartProductExtra {
*/
is_marketplace_product?: boolean;
product_slug?: string;
product_type?: 'marketplace_plugin' | 'marketplace_theme';
product_type?: 'marketplace_plugin' | 'marketplace_theme' | 'saas_plugin';
}

export interface ResponseCartGiftDetails {
Expand Down

0 comments on commit 7154ea3

Please sign in to comment.