Woo Commerce登录重定向

时间:2016-05-02 06:41:04

标签: wordpress wordpress-plugin woocommerce url-redirection custom-wordpress-pages

/**
 * Redirect wholesalers to custom page user after successful login.
 *
 * @param string $redirect_to URL to redirect to.
 * @param string $request URL the user is coming from.
 * @param object $user Logged user's data.
 * @return string
 */

如何在登录后重定向我的客户(WooCommerce插件):

add_filter('woocommerce_login_redirect', 'wcs_login_redirect');
function wcs_login_redirect( $redirect ) {
    $redirect = 'http://google.com/';
    return $redirect;
}

0 个答案:

没有答案