Skip to content

Commit

Permalink
Transform skip_wp_mail in Sensei_Guest_User and Sensei_Preview_User i…
Browse files Browse the repository at this point in the history
…n static methods
  • Loading branch information
fjorgemota committed May 9, 2023
1 parent 980b2a6 commit 6bcd03a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/class-sensei-guest-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public function skip_sensei_email( $send_email ) {
* @param array $atts Email attributes.
* @return bool|null Null if we should send the email, a boolean if not.
*/
public function skip_wp_mail( $return, $atts ) {
public static function skip_wp_mail( $return, $atts ) {
if ( self::is_current_user_guest() ) {
// If this e-mail is being dispatched while the current user is a guest, just... don't send it.
return false;
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-preview-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private function can_switch_to_preview_user( $course_id ) {
* @param array $atts Email attributes.
* @return bool|null Null if we should send the email, a boolean if not.
*/
public function skip_wp_mail( $return, $atts ) {
public static function skip_wp_mail( $return, $atts ) {
if ( self::is_preview_user_active() ) {
// If this e-mail is being dispatched while the current user is a previwe user, just... don't send it.
return false;
Expand Down

0 comments on commit 6bcd03a

Please sign in to comment.