Handle case when filter returns null

This commit is contained in:
dinamiko 2022-02-11 12:00:30 +01:00
parent 19b6eebd3e
commit 50e1c743f0

View file

@ -326,7 +326,11 @@ return array(
'api.shop.currency' => static function ( ContainerInterface $container ) : string {
$currency = get_woocommerce_currency();
if ( $currency ) {
return $currency;
}
$currency = get_option( 'woocommerce_currency' );
if ( ! $currency ) {
return 'NO_CURRENCY'; // Unlikely to happen.
}