wc_terms_and_conditions_checkbox_enabled()
See if the checkbox is enabled or not based on the existence of the terms page and checkbox text.
Хуков нет.
Возвращает
true|false.
Использование
wc_terms_and_conditions_checkbox_enabled();
Список изменений
| С версии 3.4.0 | Введена. |
Код wc_terms_and_conditions_checkbox_enabled() wc terms and conditions checkbox enabled WC 10.5.2
function wc_terms_and_conditions_checkbox_enabled() {
$page_id = wc_terms_and_conditions_page_id();
$page = $page_id ? get_post( $page_id ) : false;
return $page && wc_get_terms_and_conditions_checkbox_text();
}