update
This commit is contained in:
29
AzA march 2026/deploy/aza-woo-german-strings.php
Normal file
29
AzA march 2026/deploy/aza-woo-german-strings.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* AZA – Deutsche Übersetzung für WooCommerce-Subscription-Buttons
|
||||
*
|
||||
* Dieses Snippet ersetzt englische CTA-Texte des Subscription-Plugins
|
||||
* durch deutsche Varianten. Einfügen via:
|
||||
* - "Code Snippets"-Plugin (empfohlen), ODER
|
||||
* - functions.php des Child-Themes
|
||||
*
|
||||
* Betrifft NUR Subscription-/Abo-Button-Texte auf der Produktseite.
|
||||
*/
|
||||
|
||||
add_filter('gettext', 'aza_translate_subscription_strings', 10, 3);
|
||||
|
||||
function aza_translate_subscription_strings($translated, $original, $domain) {
|
||||
$map = array(
|
||||
'Sign up now' => 'Jetzt abonnieren',
|
||||
'Sign Up Now' => 'Jetzt abonnieren',
|
||||
'Subscribe now' => 'Jetzt abonnieren',
|
||||
'Subscribe Now' => 'Jetzt abonnieren',
|
||||
'Add to cart' => 'In den Warenkorb',
|
||||
);
|
||||
|
||||
if (isset($map[$original])) {
|
||||
return $map[$original];
|
||||
}
|
||||
|
||||
return $translated;
|
||||
}
|
||||
Reference in New Issue
Block a user