🧑‍💻 Add a temporary branded-only simulation mode

This commit is contained in:
Philipp Stracker 2025-03-25 17:29:12 +01:00
parent 62e9a5e4ec
commit 7652bc8fea
No known key found for this signature in database
3 changed files with 23 additions and 1 deletions

View file

@ -44,7 +44,10 @@ export const wooSettings = ( state ) => {
const settings = getState( state ).wooSettings || EMPTY_OBJ;
// For development and testing. Remove this eventually!
const simulateBrandedOnly = localStorage.getItem( 'simulate-branded-only' );
const simulateBrandedOnly = document.cookie
.split( '; ' )
.find( ( row ) => row.startsWith( 'simulate-branded-only=' ) )
?.split( '=' )[ 1 ];
/**
* The "own-brand-only" experience is determined on server-side, based on the installation path.