[Translations]: Fixed a bug with translations of "Privacy Policy" and "Terms and conditions (#52218)

Co-authored-by: Nikita Koida <nikita.koido@intexsoft.by>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
This commit is contained in:
Nikita 2024-10-24 13:54:26 +03:00 committed by GitHub
parent 05f70533bc
commit 7030b646f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Fix capitalization of Privacy policy and Terms and conditions

View File

@ -960,8 +960,8 @@ function wc_privacy_policy_text( $type = 'checkout' ) {
function wc_replace_policy_page_link_placeholders( $text ) {
$privacy_page_id = wc_privacy_policy_page_id();
$terms_page_id = wc_terms_and_conditions_page_id();
$privacy_link = $privacy_page_id ? '<a href="' . esc_url( get_permalink( $privacy_page_id ) ) . '" class="woocommerce-privacy-policy-link" target="_blank">' . __( 'privacy policy', 'woocommerce' ) . '</a>' : __( 'privacy policy', 'woocommerce' );
$terms_link = $terms_page_id ? '<a href="' . esc_url( get_permalink( $terms_page_id ) ) . '" class="woocommerce-terms-and-conditions-link" target="_blank">' . __( 'terms and conditions', 'woocommerce' ) . '</a>' : __( 'terms and conditions', 'woocommerce' );
$privacy_link = $privacy_page_id ? '<a href="' . esc_url( get_permalink( $privacy_page_id ) ) . '" class="woocommerce-privacy-policy-link" target="_blank">' . __( 'Privacy policy', 'woocommerce' ) . '</a>' : __( 'Privacy policy', 'woocommerce' );
$terms_link = $terms_page_id ? '<a href="' . esc_url( get_permalink( $terms_page_id ) ) . '" class="woocommerce-terms-and-conditions-link" target="_blank">' . __( 'Terms and conditions', 'woocommerce' ) . '</a>' : __( 'Terms and conditions', 'woocommerce' );
$find_replace = array(
'[terms]' => $terms_link,