PluginProbe
Admin and Site Enhancements (ASE) / 7.8.3
Admin and Site Enhancements (ASE) v7.8.3
9.1.1 9.1.0 9.0.2 9.0.1 9.0.0 8.9.2 8.9.1 8.9.0 8.8.8 8.8.7 8.8.6 8.8.5 8.8.4 8.8.3 8.8.2 8.8.1 8.8.0 8.7.3 8.7.2 8.7.1 8.2.1 8.2.2 8.2.3 8.3.0 8.3.1 All 273 releases
admin-site-enhancements / classes / class-captcha-protection.php
class-captcha-protection.php
27 lines 690 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ASENHA\Classes;
4
5 /**
6 * Class for Redirect After Login module
7 *
8 * @since 6.9.5
9 */
10 class CAPTCHA_Protection {
11
12 /**
13 * Maybe keep original redirect
14 *
15 * @since 7.8.0
16 */
17 public function maybe_keep_original_redirect( $username, $user ) {
18 // Skip redirection if login is performed from a WooCommerce checkout page
19 // This will ensure user is redirected back to the checkout page after successful login
20 if ( isset( $_REQUEST['woocommerce-login-nonce'] )
21 && wc_get_checkout_url() == $_REQUEST['redirect']
22 ) {
23 wp_safe_redirect( wc_get_checkout_url() );
24 exit();
25 }
26 }
27 }