{"id":12654190,"date":"2020-04-10T06:04:01","date_gmt":"2020-04-10T06:04:01","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/show-privacy-text-based-on-condition\/"},"modified":"2020-04-10T06:04:01","modified_gmt":"2020-04-10T06:04:01","slug":"show-privacy-text-based-on-condition","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/show-privacy-text-based-on-condition\/","title":{"rendered":"Show privacy text based on condition"},"content":{"rendered":"<p>I&#8217;d like to change the privacy text depending on whether tax is charged.<\/p>\n<p>I know I could edit functions.php and find something along the lines of:<\/p>\n<p>add_filter( &#8216;woocommerce_get_privacy_policy_text&#8217;, function ( $text, $type )<br \/>\n{<br \/>\n    switch ( $type )<br \/>\n{<br \/>\n\t\tcase &#8216;checkout&#8217;:<\/p>\n<p>But I&#8217;m unsure what I&#8217;d enter for switch so it shows privacy statement that&#8217;s default, but a different privacy when tax is being charged.<\/p>\n<p>Can anyone help? Thanks<\/p>\n","protected":false},"template":"","class_list":["post-12654190","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12654190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12654190\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12654190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}