@@ -495,48 +495,49 @@ public function register_payments_scripts() {
495
495
$ account_status_data = $ this ->account ->get_account_status_data ();
496
496
497
497
$ wcpay_settings = [
498
- 'connectUrl ' => WC_Payments_Account::get_connect_url (),
499
- 'connect ' => [
498
+ 'connectUrl ' => WC_Payments_Account::get_connect_url (),
499
+ 'connect ' => [
500
500
'country ' => WC ()->countries ->get_base_country (),
501
501
'availableCountries ' => WC_Payments_Utils::supported_countries (),
502
502
'availableStates ' => WC ()->countries ->get_states (),
503
503
],
504
- 'testMode ' => WC_Payments::mode ()->is_test (),
504
+ 'testMode ' => WC_Payments::mode ()->is_test (),
505
505
// set this flag for use in the front-end to alter messages and notices if on-boarding has been disabled.
506
- 'onBoardingDisabled ' => WC_Payments_Account::is_on_boarding_disabled (),
507
- 'errorMessage ' => $ error_message ,
508
- 'featureFlags ' => $ this ->get_frontend_feature_flags (),
509
- 'isSubscriptionsActive ' => class_exists ( 'WC_Subscriptions ' ) && version_compare ( WC_Subscriptions::$ version , '2.2.0 ' , '>= ' ),
506
+ 'onBoardingDisabled ' => WC_Payments_Account::is_on_boarding_disabled (),
507
+ 'errorMessage ' => $ error_message ,
508
+ 'featureFlags ' => $ this ->get_frontend_feature_flags (),
509
+ 'isSubscriptionsActive ' => class_exists ( 'WC_Subscriptions ' ) && version_compare ( WC_Subscriptions::$ version , '2.2.0 ' , '>= ' ),
510
510
// used in the settings page by the AccountFees component.
511
- 'zeroDecimalCurrencies ' => WC_Payments_Utils::zero_decimal_currencies (),
512
- 'fraudServices ' => $ this ->account ->get_fraud_services_config (),
513
- 'isJetpackConnected ' => $ this ->payments_api_client ->is_server_connected (),
514
- 'isJetpackIdcActive ' => Jetpack_Identity_Crisis::has_identity_crisis (),
515
- 'accountStatus ' => $ account_status_data ,
516
- 'accountFees ' => $ this ->account ->get_fees (),
517
- 'accountLoans ' => $ this ->account ->get_capital (),
518
- 'accountEmail ' => $ this ->account ->get_account_email (),
519
- 'showUpdateDetailsTask ' => $ this ->get_should_show_update_business_details_task ( $ account_status_data ),
520
- 'wpcomReconnectUrl ' => $ this ->payments_api_client ->is_server_connected () && ! $ this ->payments_api_client ->has_server_connection_owner () ? WC_Payments_Account::get_wpcom_reconnect_url () : null ,
521
- 'additionalMethodsSetup ' => [
511
+ 'zeroDecimalCurrencies ' => WC_Payments_Utils::zero_decimal_currencies (),
512
+ 'fraudServices ' => $ this ->account ->get_fraud_services_config (),
513
+ 'isJetpackConnected ' => $ this ->payments_api_client ->is_server_connected (),
514
+ 'isJetpackIdcActive ' => Jetpack_Identity_Crisis::has_identity_crisis (),
515
+ 'accountStatus ' => $ account_status_data ,
516
+ 'accountFees ' => $ this ->account ->get_fees (),
517
+ 'accountLoans ' => $ this ->account ->get_capital (),
518
+ 'accountEmail ' => $ this ->account ->get_account_email (),
519
+ 'showUpdateDetailsTask ' => $ this ->get_should_show_update_business_details_task ( $ account_status_data ),
520
+ 'wpcomReconnectUrl ' => $ this ->payments_api_client ->is_server_connected () && ! $ this ->payments_api_client ->has_server_connection_owner () ? WC_Payments_Account::get_wpcom_reconnect_url () : null ,
521
+ 'additionalMethodsSetup ' => [
522
522
'isUpeEnabled ' => WC_Payments_Features::is_upe_enabled (),
523
523
'upeType ' => WC_Payments_Features::get_enabled_upe_type (),
524
524
],
525
- 'multiCurrencySetup ' => [
525
+ 'multiCurrencySetup ' => [
526
526
'isSetupCompleted ' => get_option ( 'wcpay_multi_currency_setup_completed ' ),
527
527
],
528
- 'isMultiCurrencyEnabled ' => WC_Payments_Features::is_customer_multi_currency_enabled (),
529
- 'isClientEncryptionEligible ' => WC_Payments_Features::is_client_secret_encryption_eligible (),
530
- 'shouldUseExplicitPrice ' => WC_Payments_Explicit_Price_Formatter::should_output_explicit_price (),
531
- 'overviewTasksVisibility ' => [
528
+ 'isMultiCurrencyEnabled ' => WC_Payments_Features::is_customer_multi_currency_enabled (),
529
+ 'isClientEncryptionEligible ' => WC_Payments_Features::is_client_secret_encryption_eligible (),
530
+ 'shouldUseExplicitPrice ' => WC_Payments_Explicit_Price_Formatter::should_output_explicit_price (),
531
+ 'overviewTasksVisibility ' => [
532
532
'dismissedTodoTasks ' => get_option ( 'woocommerce_dismissed_todo_tasks ' , [] ),
533
533
'deletedTodoTasks ' => get_option ( 'woocommerce_deleted_todo_tasks ' , [] ),
534
534
'remindMeLaterTodoTasks ' => get_option ( 'woocommerce_remind_me_later_todo_tasks ' , [] ),
535
535
],
536
- 'currentUserEmail ' => $ current_user_email ,
537
- 'currencyData ' => $ currency_data ,
538
- 'restUrl ' => get_rest_url ( null , '' ), // rest url to concatenate when merchant use Plain permalinks.
539
- 'numDisputesNeedingResponse ' => $ this ->get_disputes_awaiting_response_count (),
536
+ 'currentUserEmail ' => $ current_user_email ,
537
+ 'currencyData ' => $ currency_data ,
538
+ 'restUrl ' => get_rest_url ( null , '' ), // rest url to concatenate when merchant use Plain permalinks.
539
+ 'numDisputesNeedingResponse ' => $ this ->get_disputes_awaiting_response_count (),
540
+ 'isFraudProtectionSettingsEnabled ' => WC_Payments_Features::is_fraud_protection_settings_enabled (),
540
541
];
541
542
542
543
wp_localize_script (
0 commit comments