| @@ -21,12 +21,14 @@ | ||
| 21 | 21 | * |
| 22 | 22 | * @since 6.25 |
| 23 | 23 | * |
| 24 | 24 | * @param string $email The email address to subscribe to ActiveCampaign. |
| 25 | + * | |
| 25 | 26 | * @return void |
| 26 | 27 | */ |
| 27 | 28 | public static function subscribe_to_active_campaign( $email = '' ) { |
| 28 | 29 | $user = wp_get_current_user(); |
| 30 | + | |
| 29 | 31 | if ( ! $email ) { |
| 30 | 32 | $email = $user->user_email; |
| 31 | 33 | } |
| 32 | 34 | |
| @@ -63,8 +65,9 @@ | ||
| 63 | 65 | * |
| 64 | 66 | * @since 6.25 |
| 65 | 67 | * |
| 66 | 68 | * @param string $email The email address to check. |
| 69 | + * | |
| 67 | 70 | * @return bool True if the email is fake/test, false if valid. |
| 68 | 71 | */ |
| 69 | 72 | public static function is_fake_email( $email ) { |
| 70 | 73 | if ( ! is_email( $email ) ) { |
| @@ -81,9 +84,9 @@ | ||
| 81 | 84 | '[email protected]', |
| 82 | 85 | ); |
| 83 | 86 | |
| 84 | 87 | foreach ( $substrings as $substring ) { |
| 85 | - if ( false !== strpos( $email, $substring ) ) { | |
| 88 | + if ( str_contains( $email, $substring ) ) { | |
| 86 | 89 | return true; |
| 87 | 90 | } |
| 88 | 91 | } |
| 89 | 92 | |