make sure get_current_screen method exists

This commit is contained in:
David Remer 2020-09-02 10:47:35 +03:00
parent df7e22006b
commit cb37119a99

View file

@ -173,7 +173,7 @@ class WcGatewayModule implements ModuleInterface {
$methods[] = $container->get( 'wcgateway.paypal-gateway' );
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
$screen = get_current_screen();
$screen = ! function_exists('get_current_screen') ? (object) ['id' => 'front'] : get_current_screen();
/**
* The DCC Applies object.
*