Skip to content

Commit

Permalink
fix: if show_email is false don't show the eamil in REST API response (
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored Jan 31, 2020
1 parent 3025eeb commit 4108cc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/REST/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public function filter_store_open_close_option( $data ) {
unset( $data['store_open_close'] );
}

if ( empty( $data['show_email'] ) ) {
unset( $data['email'] );
}

return $data;
}

Expand Down

0 comments on commit 4108cc1

Please sign in to comment.