Merge pull request #19986 from woocommerce/fix/19975-check-tandc-exist

Check Terms Conditions page exits
This commit is contained in:
Claudiu Lodromanean 2018-05-07 11:29:59 -07:00 committed by GitHub
commit ba81e9e6f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -717,7 +717,8 @@ function wc_privacy_policy_page_id() {
* @return bool
*/
function wc_terms_and_conditions_checkbox_enabled() {
return wc_terms_and_conditions_page_id() && wc_get_terms_and_conditions_checkbox_text();
$page = get_post( wc_terms_and_conditions_page_id() );
return $page && wc_get_terms_and_conditions_checkbox_text();
}
/**