diff --git a/packages/js/data/src/plugins/constants.ts b/packages/js/data/src/plugins/constants.ts index 1050edb792c..50fbb1985f2 100644 --- a/packages/js/data/src/plugins/constants.ts +++ b/packages/js/data/src/plugins/constants.ts @@ -55,4 +55,8 @@ export const pluginNames = { 'google-listings-and-ads': __( 'Google Listings and Ads', 'woocommerce' ), 'woo-razorpay': __( 'Razorpay', 'woocommerce' ), mailpoet: __( 'MailPoet', 'woocommerce' ), + 'pinterest-for-woocommerce': __( + 'Pinterest for WooCommerce', + 'woocommerce' + ), }; diff --git a/plugins/woocommerce-admin/client/activity-panel/panels/help.js b/plugins/woocommerce-admin/client/activity-panel/panels/help.js index b13474e4f0b..a27469c37c1 100644 --- a/plugins/woocommerce-admin/client/activity-panel/panels/help.js +++ b/plugins/woocommerce-admin/client/activity-panel/panels/help.js @@ -100,6 +100,10 @@ function getMarketingItems( props ) { link: 'https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started', }, + activePlugins.includes( 'pinterest-for-woocommerce' ) && { + title: __( 'Set up Pinterest for WooCommerce', 'woocommerce' ), + link: 'https://woocommerce.com/products/pinterest-for-woocommerce/', + }, activePlugins.includes( 'mailchimp-for-woocommerce' ) && { title: __( 'Connect Mailchimp for WooCommerce', 'woocommerce' ), link: diff --git a/plugins/woocommerce/assets/images/onboarding/pinterest.png b/plugins/woocommerce/assets/images/onboarding/pinterest.png new file mode 100644 index 00000000000..2951353d8fd Binary files /dev/null and b/plugins/woocommerce/assets/images/onboarding/pinterest.png differ diff --git a/plugins/woocommerce/changelog/add-32141_pinterest_extension_to_obw b/plugins/woocommerce/changelog/add-32141_pinterest_extension_to_obw new file mode 100644 index 00000000000..83bce430bb6 --- /dev/null +++ b/plugins/woocommerce/changelog/add-32141_pinterest_extension_to_obw @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Add Pinterest extension to onboarding wizard and marketing task #32527 diff --git a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php index a148810ed2e..d30956054d3 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php @@ -397,6 +397,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { 'creative-mail-by-constant-contact', 'facebook-for-woocommerce', 'google-listings-and-ads', + 'pinterest-for-woocommerce', 'mailpoet', ), 'type' => 'string', diff --git a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php index 6ec1c56dccb..202dc7f5982 100644 --- a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php +++ b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php @@ -36,6 +36,7 @@ class DefaultFreeExtensions { 'plugins' => [ self::get_plugin( 'mailpoet' ), self::get_plugin( 'google-listings-and-ads' ), + self::get_plugin( 'pinterest-for-woocommerce' ), ], ], [ @@ -52,6 +53,7 @@ class DefaultFreeExtensions { 'title' => __( 'Grow your store', 'woocommerce' ), 'plugins' => [ self::get_plugin( 'google-listings-and-ads:alt' ), + self::get_plugin( 'pinterest-for-woocommerce:alt' ), ], ], ]; @@ -76,7 +78,7 @@ class DefaultFreeExtensions { '', '' ), - 'image_url' => plugins_url( 'images/onboarding/google-listings-and-ads.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/google-listings-and-ads.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart', 'is_built_by_wc' => true, 'is_visible' => [ @@ -94,28 +96,58 @@ class DefaultFreeExtensions { 'google-listings-and-ads:alt' => [ 'name' => __( 'Google Listings & Ads', 'woocommerce' ), 'description' => __( 'Reach more shoppers and drive sales for your store. Integrate with Google to list your products for free and launch paid ad campaigns.', 'woocommerce' ), - 'image_url' => plugins_url( 'images/onboarding/google-listings-and-ads.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/google-listings-and-ads.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart', 'is_built_by_wc' => true, ], + 'pinterest-for-woocommerce' => [ + 'name' => __( 'Pinterest for WooCommerce', 'woocommerce' ), + 'description' => sprintf( + /* translators: 1: opening product link tag. 2: closing link tag */ + __( 'Inspire shoppers with %1$sPinterest for WooCommerce%2$s', 'woocommerce' ), + '', + '' + ), + 'image_url' => plugins_url( '/assets/images/onboarding/pinterest.png', WC_PLUGIN_FILE ), + 'manage_url' => 'admin.php?page=pinterest-for-woocommerce', + 'is_visible' => [ + [ + 'type' => 'not', + 'operand' => [ + [ + 'type' => 'plugins_activated', + 'plugins' => [ 'pinterest-for-woocommerce' ], + ], + ], + ], + ], + 'is_built_by_wc' => false, + ], + 'pinterest-for-woocommerce:alt' => [ + 'name' => __( 'Pinterest for WooCommerce', 'woocommerce' ), + 'description' => __( 'Get your products in front of Pinterest users searching for ideas and things to buy. Get started with Pinterest and make your entire product catalog browsable.', 'woocommerce' ), + 'image_url' => plugins_url( '/assets/images/onboarding/pinterest.png', WC_PLUGIN_FILE ), + 'manage_url' => 'admin.php?page=wc-admin&path=%2Fpinterest%2Flanding', + 'is_built_by_wc' => false, + ], 'mailpoet' => [ 'name' => __( 'MailPoet', 'woocommerce' ), 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce' ), - 'image_url' => plugins_url( 'images/onboarding/mailpoet.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/mailpoet.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailpoet-newsletters', 'is_built_by_wc' => true, ], 'mailchimp-for-woocommerce' => [ 'name' => __( 'Mailchimp', 'woocommerce' ), 'description' => __( 'Send targeted campaigns, recover abandoned carts and much more with Mailchimp.', 'woocommerce' ), - 'image_url' => plugins_url( 'images/onboarding/mailchimp-for-woocommerce.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/mailchimp-for-woocommerce.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailchimp-woocommerce', 'is_built_by_wc' => false, ], 'creative-mail-by-constant-contact' => [ 'name' => __( 'Creative Mail for WooCommerce', 'woocommerce' ), 'description' => __( 'Create on-brand store campaigns, fast email promotions and customer retargeting with Creative Mail.', 'woocommerce' ), - 'image_url' => plugins_url( 'images/onboarding/creative-mail-by-constant-contact.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/creative-mail-by-constant-contact.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=creativemail', 'is_built_by_wc' => false, ], @@ -449,7 +481,7 @@ class DefaultFreeExtensions { 'mailpoet:alt' => [ 'name' => __( 'MailPoet', 'woocommerce' ), 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce' ), - 'image_url' => plugins_url( 'images/onboarding/mailpoet.png', WC_ADMIN_PLUGIN_FILE ), + 'image_url' => plugins_url( '/assets/images/onboarding/mailpoet.png', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailpoet-newsletters', 'is_built_by_wc' => true, ],