LLMS_Order_Generator::validate_terms()

Validates the site’s terms and conditions were submitted.


Return Return

(boolean|WP_Error) Returns true on success or an error object.


Top ↑

Source Source

File: includes/class-llms-order-generator.php

699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
protected function validate_terms() {
 
    if ( llms_are_terms_and_conditions_required() && ! llms_parse_bool( $this->data['llms_agree_to_terms'] ?? 'no' ) ) {
        return $this->error(
            self::E_SITE_TERMS,
            sprintf(
                // Translators: %s = The title of the site's LifterLMS Terms and Conditions page.
                __( 'You must agree to the %s.', 'lifterlms' ),
                get_the_title( get_option( 'lifterlms_terms_page_id' ) )
            )
        );
    }
 
    return true;
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.