mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #1856 from woocommerce/PCP-2328-remove-the-home-location-from-default-enabled-pay-later-messaging-locations
Remove the Home location from default enabled Pay Later messaging locations (2328)
This commit is contained in:
commit
4827fbd455
2 changed files with 4 additions and 2 deletions
|
@ -1379,7 +1379,9 @@ return array(
|
|||
);
|
||||
},
|
||||
'wcgateway.settings.pay-later.default-messaging-locations' => static function( ContainerInterface $container ): array {
|
||||
return array_keys( $container->get( 'wcgateway.settings.pay-later.messaging-locations' ) );
|
||||
$locations = $container->get( 'wcgateway.settings.pay-later.messaging-locations' );
|
||||
unset( $locations['home'] );
|
||||
return array_keys( $locations );
|
||||
},
|
||||
'wcgateway.settings.pay-later.button-locations' => static function( ContainerInterface $container ): array {
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
|
|
|
@ -184,7 +184,7 @@ class SettingsPageAssets {
|
|||
}
|
||||
|
||||
$screen = get_current_screen();
|
||||
if ( $screen->id !== 'woocommerce_page_wc-settings' ) {
|
||||
if ( ! $screen || $screen->id !== 'woocommerce_page_wc-settings' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue