Rest::getApiUrl(), 'nonce' => wp_create_nonce( 'wp_rest' ), 'name' => get_bloginfo( 'name' ), 'homeUrl' => home_url(), 'assetUrl' => self::$distUrl, 'appToken' => Options::getAppToken(), 'appUrl' => ACRKit::getAppUrl(), 'locale' => get_locale(), 'currency' => get_woocommerce_currency(), ) ); } public static function frontendLocalizeScript() { wp_localize_script( 'acr-kit-frontend', 'acrKitApp', array( 'apiUrl' => Rest::getApiUrl(), 'nonce' => wp_create_nonce( 'wp_rest' ), 'assetUrl' => self::$distUrl, 'utilities' => Utilities::toFrontEnd(), ) ); } public static function allowEsModule() { add_filter( 'script_loader_tag', function ( $tag, $handle ) { if ( strpos( $handle, 'acr-kit-' ) === 0 ) { // Ensure we only add a type module once and keep other attributes. if ( false === strpos( $tag, 'type=' ) ) { $tag = str_replace( '