Merge pull request #2508 from judgej/patch-1

Update woocommerce-ajax.php
This commit is contained in:
Mike Jolley 2013-02-25 02:08:42 -08:00
commit 8d54dbdad5
1 changed files with 4 additions and 1 deletions

View File

@ -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' );