@@ -259,6 +259,11 @@ class SmartButton implements SmartButtonInterface {
259259 */
260260 private bool $ server_side_shipping_callback_enabled ;
261261
262+ /**
263+ * Whether the AppSwitch is enabled (feature flag).
264+ */
265+ private bool $ appswitch_enabled ;
266+
262267 /**
263268 * Whether the final review is enabled in blocks settings.
264269 */
@@ -291,6 +296,7 @@ class SmartButton implements SmartButtonInterface {
291296 * @param LoggerInterface $logger The logger.
292297 * @param bool $should_handle_shipping_in_paypal Whether the shipping should be handled in PayPal.
293298 * @param bool $server_side_shipping_callback_enabled Whether the server-side shipping callback is enabled (feature flag).
299+ * @param bool $appswitch_enabled Whether the AppSwitch is enabled (feature flag).
294300 * @param DisabledFundingSources $disabled_funding_sources List of funding sources to be disabled.
295301 * @param CardPaymentsConfiguration $dcc_configuration The DCC Gateway Configuration.
296302 * @param PartnerAttribution $partner_attribution The PayPal Partner Attribution Helper.
@@ -321,6 +327,7 @@ public function __construct(
321327 LoggerInterface $ logger ,
322328 bool $ should_handle_shipping_in_paypal ,
323329 bool $ server_side_shipping_callback_enabled ,
330+ bool $ appswitch_enabled ,
324331 DisabledFundingSources $ disabled_funding_sources ,
325332 CardPaymentsConfiguration $ dcc_configuration ,
326333 PartnerAttribution $ partner_attribution ,
@@ -350,6 +357,7 @@ public function __construct(
350357 $ this ->payment_tokens_endpoint = $ payment_tokens_endpoint ;
351358 $ this ->should_handle_shipping_in_paypal = $ should_handle_shipping_in_paypal ;
352359 $ this ->server_side_shipping_callback_enabled = $ server_side_shipping_callback_enabled ;
360+ $ this ->appswitch_enabled = $ appswitch_enabled ;
353361 $ this ->disabled_funding_sources = $ disabled_funding_sources ;
354362 $ this ->dcc_configuration = $ dcc_configuration ;
355363 $ this ->partner_attribution = $ partner_attribution ;
@@ -1365,6 +1373,9 @@ public function script_data(): array {
13651373 'server_side_shipping_callback ' => array (
13661374 'enabled ' => $ this ->server_side_shipping_callback_enabled ,
13671375 ),
1376+ 'appswitch ' => array (
1377+ 'enabled ' => $ this ->appswitch_enabled ,
1378+ ),
13681379 'needShipping ' => $ this ->need_shipping (),
13691380 'vaultingEnabled ' => $ this ->settings ->has ( 'vault_enabled ' ) && $ this ->settings ->get ( 'vault_enabled ' ),
13701381 'productType ' => null ,
0 commit comments