Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic to verify the terms page exists for adding to email #2581

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelogs/fix-terms-empty-link-emails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
significance: patch
type: fixed
entry: Fixed logic to validate that the terms page exists before adding to email
footer.
4 changes: 4 additions & 0 deletions templates/emails/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
$terms = false;
if ( 'yes' === get_option( 'lifterlms_registration_require_agree_to_terms', 'no' ) ) {
$terms = get_option( 'lifterlms_terms_page_id', false );
// Unset terms if the page is not published.
if ( $terms && 'publish' !== get_post_status( $terms ) ) {
$terms = false;
}
}
?>
</td>
Expand Down
Loading