Merge pull request #19986 from woocommerce/fix/19975-check-tandc-exist
Check Terms Conditions page exits
This commit is contained in:
commit
ba81e9e6f2
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue