Block field “(optional)” not translatable
-
Default address fields that are optional aren’t using translation for the word “optional” as it’s hardcoded in the following location:
wp-content/plugins/woo-checkout-field-editor-pro/block/class-thwcfd-block.php:177
Related, it looks like the plugin uses separate translations for every field label e.g. “Email address (optional)” instead of separating the “(optional)” part so that it would use default translations.
This can be seen in the get_default_block_fields() function.
Because of this, all fields need to be re-translated even when not changing labels and translations work fine without the plugin.
The topic ‘Block field “(optional)” not translatable’ is closed to new replies.