From 3e7da11c30a624a3a3fe4c10d258944d1984fa9e Mon Sep 17 00:00:00 2001 From: haszari Date: Wed, 10 Jul 2019 15:05:36 +1200 Subject: [PATCH] fix logic for new tab check on edit product page --- assets/js/admin/marketplace-suggestions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/admin/marketplace-suggestions.js b/assets/js/admin/marketplace-suggestions.js index a5fdbbfb4be..3eee50b17b9 100644 --- a/assets/js/admin/marketplace-suggestions.js +++ b/assets/js/admin/marketplace-suggestions.js @@ -118,7 +118,12 @@ // By default, CTA links should open in same tab (and feel integrated with Woo). // Exception: when editing products, use new tab. User may have product edits // that need to be saved. - if ( 'editproduct' === context ) { + var newTabContexts = [ + 'product-edit-meta-tab-header', + 'product-edit-meta-tab-footer', + 'product-edit-meta-tab-body' + ]; + if ( _.includes( newTabContexts, context ) ) { linkoutButton.setAttribute( 'target', 'blank' ); }