LLMS_Order_Generator::validate_terms()
Validates the site’s terms and conditions were submitted.
Contents
Return Return
(boolean|WP_Error) Returns true on success or an error object.
Source Source
File: includes/class-llms-order-generator.php
* Validates the site's terms and conditions were submitted.
*
* @since 7.0.0
*
* @return boolean|WP_Error Returns `true` on success or an error object.
*/
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' ) )
)
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |