Use realpath for __FILE__ when creating url

on some sites __FILE__ contains .. which breaks url creation
This commit is contained in:
Alex P 2022-01-14 16:35:13 +02:00
parent 5591b2806d
commit 314ba44bb9
5 changed files with 6 additions and 6 deletions

View file

@ -17,7 +17,7 @@ return array(
'vaulting.module-url' => static function ( ContainerInterface $container ): string {
return plugins_url(
'/modules/ppcp-vaulting/',
dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
dirname( realpath( __FILE__ ), 3 ) . '/woocommerce-paypal-payments.php'
);
},
'vaulting.assets.myaccount-payments' => function( ContainerInterface $container ) : MyAccountPaymentsAssets {