Fix the wrong return url in multisite setup

This commit is contained in:
Narek Zakarian 2024-04-15 18:35:45 +04:00
parent ffe3a0b958
commit 80b5abda15
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ class ApplicationContextRepository {
$payment_preference = $this->settings->has( 'payee_preferred' ) && $this->settings->get( 'payee_preferred' ) ? $payment_preference = $this->settings->has( 'payee_preferred' ) && $this->settings->get( 'payee_preferred' ) ?
ApplicationContext::PAYMENT_METHOD_IMMEDIATE_PAYMENT_REQUIRED : ApplicationContext::PAYMENT_METHOD_UNRESTRICTED; ApplicationContext::PAYMENT_METHOD_IMMEDIATE_PAYMENT_REQUIRED : ApplicationContext::PAYMENT_METHOD_UNRESTRICTED;
$context = new ApplicationContext( $context = new ApplicationContext(
network_home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) ), home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) ),
(string) wc_get_checkout_url(), (string) wc_get_checkout_url(),
(string) $brand_name, (string) $brand_name,
$locale, $locale,

View file

@ -36,7 +36,7 @@ class ApplicationContextRepositoryTest extends TestCase
->andReturn($value); ->andReturn($value);
} }
expect('network_home_url') expect('home_url')
->andReturn('https://example.com/'); ->andReturn('https://example.com/');
expect('wc_get_checkout_url') expect('wc_get_checkout_url')
->andReturn('https://example.com/checkout/'); ->andReturn('https://example.com/checkout/');