関数
RedirectRouteGuards::quickPayRedirectOnLoginSuccess()
戻り値 戻り値
ファイル: src/Routing/RedirectRouteGuards.php
public function quickPayRedirectOnLoginSuccess() {
return function () {
global $usces;
$redirectUrl = isset($_REQUEST['wcexaapRedirect']) ? $_REQUEST['wcexaapRedirect'] : '';
if (isset($_POST['customerlogin']) && !empty($redirectUrl)) {
if ($usces->page === 'delivery') {
// Login succeeded. Redirect to QuickPay page
if (isset($_POST['allowAmazonLogin']) && !empty($_SESSION['usces_member']['ID'])) {
(new MemberMeta((int)$_SESSION['usces_member']['ID']))->updateAllowAmazonToWelcartLogin(true);
}
wp_safe_redirect($redirectUrl);
exit;
}
}
};
}