Skip to content

Commit

Permalink
Inline usage of is_login function in SiwG.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Feb 25, 2025
1 parent 6247a92 commit c6d49af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/Modules/Sign_In_With_Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ private function render_signinwithgoogle_woocommerce() {
* rendered the code to replace buttons.
*/
private function render_signinwithgoogle() {
$is_wp_login = is_login();
// `is_login()` isn't available until WP 6.1.
$is_wp_login = false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] ?? '' ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
$is_woocommerce = class_exists( 'woocommerce' );
$is_woocommerce_login = did_action( 'woocommerce_login_form_start' );

Expand Down

0 comments on commit c6d49af

Please sign in to comment.