From 36abbfd23337fd05d97784f42e9516ae1544f4eb Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Wed, 12 Jul 2023 20:14:24 +0300 Subject: [PATCH] refact: Use short array syntax --- .../src/Internal/Admin/WcPayWelcomePage.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php b/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php index e0035bc501d..5849cbb4f98 100644 --- a/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php +++ b/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php @@ -42,7 +42,7 @@ class WcPayWelcomePage { */ public function __construct() { add_action( 'admin_menu', [ $this, 'register_payments_welcome_page' ] ); - add_filter( 'woocommerce_admin_shared_settings', array( $this, 'shared_settings' ) ); + add_filter( 'woocommerce_admin_shared_settings', [ $this, 'shared_settings' ] ); add_filter( 'woocommerce_admin_allowed_promo_notes', [ $this, 'allowed_promo_notes' ] ); } @@ -98,7 +98,7 @@ class WcPayWelcomePage { $menu_icon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NTIiIGhlaWdodD0iNjg0Ij48cGF0aCBmaWxsPSIjYTJhYWIyIiBkPSJNODIgODZ2NTEyaDY4NFY4NlptMCA1OThjLTQ4IDAtODQtMzgtODQtODZWODZDLTIgMzggMzQgMCA4MiAwaDY4NGM0OCAwIDg0IDM4IDg0IDg2djUxMmMwIDQ4LTM2IDg2LTg0IDg2em0zODQtNTU2djQ0aDg2djg0SDM4MnY0NGgxMjhjMjQgMCA0MiAxOCA0MiA0MnYxMjhjMCAyNC0xOCA0Mi00MiA0MmgtNDR2NDRoLTg0di00NGgtODZ2LTg0aDE3MHYtNDRIMzM4Yy0yNCAwLTQyLTE4LTQyLTQyVjIxNGMwLTI0IDE4LTQyIDQyLTQyaDQ0di00NHoiLz48L3N2Zz4='; - $menu_data = array( + $menu_data = [ 'id' => 'wc-calypso-bridge-payments-welcome-page', 'title' => esc_html__( 'Payments', 'woocommerce' ), 'path' => '/wc-pay-welcome-page', @@ -110,7 +110,7 @@ class WcPayWelcomePage { 'is_top_level' => true, ], 'icon' => $menu_icon, - ); + ]; wc_admin_register_page( $menu_data ); @@ -119,7 +119,7 @@ class WcPayWelcomePage { // We need to register this menu via add_menu_page so that it doesn't become a child of // WooCommerce menu. if ( get_option( 'woocommerce_navigation_enabled', 'no' ) === 'yes' ) { - $menu_with_nav_data = array( + $menu_with_nav_data = [ esc_html__( 'Payments', 'woocommerce' ), esc_html__( 'Payments', 'woocommerce' ), 'view_woocommerce_reports', @@ -127,7 +127,7 @@ class WcPayWelcomePage { null, $menu_icon, 56, - ); + ]; call_user_func_array( 'add_menu_page', $menu_with_nav_data ); }