mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
🎨 Automatic code style fixes
This commit is contained in:
parent
82c6b78f50
commit
7534ae5c11
1 changed files with 18 additions and 18 deletions
|
@ -123,7 +123,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
)
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'ppcp-switch-settings-ui', '', array( 'wp-i18n' ), $script_asset_file['version'] );
|
||||
wp_enqueue_script( 'ppcp-switch-settings-ui', '', array( 'wp-i18n' ), $script_asset_file['version'], false );
|
||||
wp_set_script_translations(
|
||||
'ppcp-switch-settings-ui',
|
||||
'woocommerce-paypal-payments',
|
||||
|
@ -201,7 +201,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
true
|
||||
);
|
||||
|
||||
wp_enqueue_script( 'ppcp-admin-settings', '', array( 'wp-i18n' ), $script_asset_file['version'] );
|
||||
wp_enqueue_script( 'ppcp-admin-settings', '', array( 'wp-i18n' ), $script_asset_file['version'], false );
|
||||
wp_set_script_translations(
|
||||
'ppcp-admin-settings',
|
||||
'woocommerce-paypal-payments',
|
||||
|
@ -485,7 +485,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
if ( $is_payments_page ) {
|
||||
$methods = array_filter(
|
||||
$methods,
|
||||
function ( $method ) use ( $all_gateway_ids ): bool {
|
||||
function ( $method ) use ( $all_gateway_ids ) : bool {
|
||||
if ( ! is_object( $method )
|
||||
|| $method->id === PayPalGateway::ID
|
||||
|| ! in_array( $method->id, $all_gateway_ids, true )
|
||||
|
@ -609,7 +609,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
// Enable Fastlane after onboarding if the store is compatible.
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_toggle_payment_gateways',
|
||||
function( PaymentSettings $payment_methods, ConfigurationFlagsDTO $flags ) use ( $container ) {
|
||||
function ( PaymentSettings $payment_methods, ConfigurationFlagsDTO $flags ) use ( $container ) {
|
||||
if ( $flags->is_business_seller && $flags->use_card_payments ) {
|
||||
$compatibility_checker = $container->get( 'axo.helpers.compatibility-checker' );
|
||||
assert( $compatibility_checker instanceof CompatibilityChecker );
|
||||
|
@ -626,7 +626,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
// Toggle payment gateways after onboarding based on flags.
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_sync_gateways',
|
||||
static function() use ( $container ) {
|
||||
static function () use ( $container ) {
|
||||
$settings_data_manager = $container->get( 'settings.service.data-manager' );
|
||||
assert( $settings_data_manager instanceof SettingsDataManager );
|
||||
$settings_data_manager->sync_gateway_settings();
|
||||
|
@ -713,7 +713,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
* @param string $gateway_name The gateway name.
|
||||
* @return bool True if the payment gateway with the given name is enabled, otherwise false.
|
||||
*/
|
||||
protected function is_gateway_enabled( string $gateway_name ): bool {
|
||||
protected function is_gateway_enabled( string $gateway_name ) : bool {
|
||||
$gateway_settings = get_option( "woocommerce_{$gateway_name}_settings", array() );
|
||||
$gateway_enabled = $gateway_settings['enabled'] ?? false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue