Merge pull request #2508 from judgej/patch-1
Update woocommerce-ajax.php
This commit is contained in:
commit
8d54dbdad5
|
@ -86,6 +86,9 @@ function woocommerce_sidebar_login_ajax_process() {
|
|||
|
||||
// Login
|
||||
$user = wp_signon( $creds, $secure_cookie );
|
||||
|
||||
// Filter the redirect URL.
|
||||
$redirect_to = apply_filters('woocommerce_login_widget_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
|
||||
|
||||
// Redirect filter
|
||||
if ( $secure_cookie && strstr( $redirect_to, 'wp-admin' ) ) $redirect_to = str_replace( 'http:', 'https:', $redirect_to );
|
||||
|
@ -1852,4 +1855,4 @@ function woocommerce_product_ordering() {
|
|||
die( json_encode( $new_pos ) );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_woocommerce_product_ordering', 'woocommerce_product_ordering' );
|
||||
add_action( 'wp_ajax_woocommerce_product_ordering', 'woocommerce_product_ordering' );
|
||||
|
|
Loading…
Reference in New Issue