wc_get_privacy_policy_text()WC 3.4.0

Get the privacy policy text, if set.

Хуки из функции

Возвращает

Строку.

Использование

wc_get_privacy_policy_text( $type );
$type(строка)
Type of policy to load. Valid values include registration and checkout.
По умолчанию: ''

Список изменений

С версии 3.4.0 Введена.

Код wc_get_privacy_policy_text() WC 8.7.0

function wc_get_privacy_policy_text( $type = '' ) {
	$text = '';

	switch ( $type ) {
		case 'checkout':
			/* translators: %s privacy policy page name and link */
			$text = get_option( 'woocommerce_checkout_privacy_policy_text', sprintf( __( 'Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our %s.', 'woocommerce' ), '[privacy_policy]' ) );
			break;
		case 'registration':
			/* translators: %s privacy policy page name and link */
			$text = get_option( 'woocommerce_registration_privacy_policy_text', sprintf( __( 'Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our %s.', 'woocommerce' ), '[privacy_policy]' ) );
			break;
	}

	return trim( apply_filters( 'woocommerce_get_privacy_policy_text', $text, $type ) );
}