diff --git a/plugins/woocommerce-admin/client/index.js b/plugins/woocommerce-admin/client/index.js index 3f332ad045a..ef0028c1ad1 100644 --- a/plugins/woocommerce-admin/client/index.js +++ b/plugins/woocommerce-admin/client/index.js @@ -83,12 +83,19 @@ if ( navigationRoot ) { render( , navigationRoot ); } -// Set up customer effort score survey. -( function () { - const root = appRoot || embeddedRoot; +// Render the CustomerEffortScoreTracksContainer only if +// the feature flag is enabled. +if ( + window.wcAdminFeatures && + window.wcAdminFeatures[ 'customer-effort-score-tracks' ] === true +) { + // Set up customer effort score survey. + ( function () { + const root = appRoot || embeddedRoot; - render( - , - root.insertBefore( document.createElement( 'div' ), null ) - ); -} )(); + render( + , + root.insertBefore( document.createElement( 'div' ), null ) + ); + } )(); +}