Skip to content

Commit

Permalink
Fix post days to access
Browse files Browse the repository at this point in the history
  • Loading branch information
vaclavgreif committed May 24, 2023
1 parent 6480817 commit 0cb5658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function user_can_view_post( $post_id = '', $user_id = '' ) {

if ( $days_to_access = $this->get_post_days_to_access() ) {
// Get the date of subscription to the group
if ( $subscription_date >= wp_date( 'Y-m-d', strtotime( "now -$days_to_access days" ) ) ) {
if ( $subscription_date > wp_date( 'Y-m-d', strtotime( "now -$days_to_access days" ) ) ) {
// if the user does not have access YET, just break the loop here, as the user might have multiple subscriptions
continue;
}
Expand Down

0 comments on commit 0cb5658

Please sign in to comment.