From f489739349c866dfc28f08f8eb6d3f1f2bff73fc Mon Sep 17 00:00:00 2001 From: Bryce Date: Sat, 8 Nov 2014 14:30:18 -0800 Subject: [PATCH] Add filter for registration auth cookie #6707 --- includes/class-wc-form-handler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index a7e6c2e27eb..e6dbaf26304 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -903,7 +903,9 @@ class WC_Form_Handler { return; } - wc_set_customer_auth_cookie( $new_customer ); + if ( apply_filters( 'woocommerce_registration_auth_new_customer', true, $new_customer ) ) { + wc_set_customer_auth_cookie( $new_customer ); + } // Redirect if ( wp_get_referer() ) {