diff --git a/modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php b/modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php index abd3dd3ba..08650d088 100644 --- a/modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php +++ b/modules/ppcp-api-client/src/Repository/ApplicationContextRepository.php @@ -50,7 +50,7 @@ class ApplicationContextRepository { $landingpage = $this->settings->has( 'landing_page' ) ? $this->settings->get( 'landing_page' ) : ApplicationContext::LANDING_PAGE_NO_PREFERENCE; $context = new ApplicationContext( - \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ), + network_home_url( \WC_AJAX::get_endpoint( ReturnUrlEndpoint::ENDPOINT ) ), (string) wc_get_checkout_url(), (string) $brand_name, $locale, diff --git a/tests/PHPUnit/WcGateway/Repository/ApplicationContextRepositoryTest.php b/tests/PHPUnit/WcGateway/Repository/ApplicationContextRepositoryTest.php index 7b8d1800e..a7bc0dd87 100644 --- a/tests/PHPUnit/WcGateway/Repository/ApplicationContextRepositoryTest.php +++ b/tests/PHPUnit/WcGateway/Repository/ApplicationContextRepositoryTest.php @@ -36,7 +36,7 @@ class ApplicationContextRepositoryTest extends TestCase ->andReturn($value); } - expect('home_url') + expect('network_home_url') ->andReturn('https://example.com/'); expect('wc_get_checkout_url') ->andReturn('https://example.com/checkout/');