diff --git a/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/index.tsx b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/index.tsx index 04d67be157..48c7cabe79 100644 --- a/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/index.tsx +++ b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/index.tsx @@ -5,6 +5,7 @@ import { step as SubscriptionTrialEnded } from './steps/subscription-trial-ended import { step as SubscriptionTrialStarted } from './steps/subscription-trial-started'; import { step as SubscriptionRenewed } from './steps/subscription-renewed'; import { step as SubscriptionPaymentFailed } from './steps/subscription-payment-failed'; +import { step as SubscriptionExpired } from './steps/subscription-expired'; import { registerStepType } from '../../editor/store'; export const initialize = (): void => { @@ -17,5 +18,6 @@ export const initialize = (): void => { registerStepType(SubscriptionTrialStarted); registerStepType(SubscriptionRenewed); registerStepType(SubscriptionPaymentFailed); + registerStepType(SubscriptionExpired); // Insert new steps here }; diff --git a/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/icon.tsx b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/icon.tsx new file mode 100644 index 0000000000..0319fe30f7 --- /dev/null +++ b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/icon.tsx @@ -0,0 +1,26 @@ +export function Icon(): JSX.Element { + return ( + + + + + + ); +} diff --git a/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/index.tsx b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/index.tsx new file mode 100644 index 0000000000..7b2ad9e2ec --- /dev/null +++ b/mailpoet/assets/js/src/automation/integrations/woocommerce-subscriptions/steps/subscription-expired/index.tsx @@ -0,0 +1,37 @@ +import { __, _x } from '@wordpress/i18n'; +import { StepType } from '../../../../editor/store'; +import { Icon } from './icon'; +import { PremiumModalForStepEdit } from '../../../../../common/premium-modal'; + +const keywords = [ + __('woocommerce', 'mailpoet'), + __('subscription', 'mailpoet'), + __('expired', 'mailpoet'), +]; + +export const step: StepType = { + key: 'woocommerce-subscriptions:subscription-expired', + group: 'triggers', + title: () => __('Woo Subscription expired', 'mailpoet'), + description: () => + __('Start the automation when a subscription expires.', 'mailpoet'), + + subtitle: () => _x('Trigger', 'noun', 'mailpoet'), + keywords, + foreground: '#2271b1', + background: '#f0f6fc', + icon: () => , + edit: () => ( + + {__( + 'Starting an automation when a subscription expires is a premium feature.', + 'mailpoet', + )} + + ), +} as const;