mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
add fallback when get_current_screen returns null.
This commit is contained in:
parent
021d1395d0
commit
806c211e35
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ class WcGatewayModule implements ModuleInterface {
|
|||
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
||||
|
||||
$screen = ! function_exists( 'get_current_screen' ) ? (object) array( 'id' => 'front' ) : get_current_screen();
|
||||
if (! $screen) {
|
||||
$screen = (object) array( 'id' => 'front' );
|
||||
}
|
||||
/**
|
||||
* The DCC Applies object.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue