Skip to content

Commit

Permalink
added refresh cache condition for facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo7670 committed Jul 11, 2024
1 parent a5b361b commit 8f4824b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/Social/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID,

// Refresh Facebook cache before sharing
$post_url = get_permalink($post_id);
$this->refresh_facebook_cache($app_id, $app_secret, $post_url);

if( ( get_post_meta( $post_id, $count_meta_key, true ) ) > 0 ) {
$this->refresh_facebook_cache($app_id, $app_secret, $post_url);
}

// group api
if ($type === 'group') {
Expand Down

0 comments on commit 8f4824b

Please sign in to comment.