wc_get_privacy_policy_text( string $type = '' )
Get the privacy policy text, if set.
Description Description
Parameters Parameters
- $type
-
(Optional) Type of policy to load. Valid values include registration and checkout.
Default value: ''
Return Return
(string)
Source Source
File: includes/wc-template-functions.php
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 ) ); }
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |