wc_get_privacy_policy_text()
Get the privacy policy text, if set.
Hooks from the function
Return
String
.
Usage
wc_get_privacy_policy_text( $type );
- $type(string)
- Type of policy to load. Valid values include registration and checkout.
Default: ''
Changelog
Since 3.4.0 | Introduced. |
wc_get_privacy_policy_text() wc get privacy policy text code WC 9.5.1
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 ) ); }