関数
RedirectRouteGuards::dlsellerLoginRedirect()
Redirects to customer login page for DLSeller items
戻り値 戻り値
ファイル: src/Routing/RedirectRouteGuards.php
public function dlsellerLoginRedirect() { return function () { if (defined('WCEX_DLSELLER')) { if (dlseller_have_dlseller_content() && !usces_is_login()) { $reqkey = WordPressRequestKeyRouteCollector::ROUTE_KEY; $currentRoute = isset($_REQUEST[$reqkey]) ? $_REQUEST[$reqkey] : ''; $sessionId = isset($_REQUEST['amazonCheckoutSessionId']) ? $_REQUEST['amazonCheckoutSessionId'] : ''; if (!empty($currentRoute) && !empty($sessionId)) { $redirectAfterLoginUrl = add_query_arg( [ $reqkey => rawurlencode($currentRoute), 'amazonCheckoutSessionId' => $sessionId, ], USCES_CART_URL ); $dlsellerRedirectUrl = $this->module->redirectRoutes->createPublicQueryUrl( '/checkout/quickpay/dlsellerLogin', USCES_CART_URL, [ 'wcexaapRedirect' => rawurlencode($redirectAfterLoginUrl), ] ); wp_safe_redirect($dlsellerRedirectUrl); exit(); } } } }; }