Skip to content

Commit

Permalink
social profile accessing issue from subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo7670 committed Feb 21, 2024
1 parent e742615 commit 929a4e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/Social/InstantShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ public function instant_share_metabox_data_save($post_id, $post)
*/
public function instant_share_fetch_profile()
{
if( !current_user_can('edit_post') ) {
wp_send_json_error( [ 'message' => __('You are unauthorized to access social profiles.', 'wp-scheduled-posts') ], 401 );
wp_die();
}
$allProfile = array();
// get data from db
$facebook = \WPSP\Helper::get_social_profile(WPSCP_FACEBOOK_OPTION_NAME);
Expand Down

0 comments on commit 929a4e7

Please sign in to comment.