woocommerce / woocommerce-paypal-payments

https://wordpress.org/plugins/woocommerce-paypal-payments/
GNU General Public License v2.0
62 stars 47 forks source link

Fastlane strip www. from merchant URL token #2288

Closed Dinamiko closed 4 months ago

Dinamiko commented 4 months ago

Depending on the server config, the follopwing code may return a domain with www.:

$domain = $_SERVER['HTTP_HOST'];

This is breaking Fastlane. So we must strip the www. from the domain.

Suggested solution

$domain = preg_replace('/^www\./', '', $domain);