This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to use a variable within functions.php in a custom shortcode for your WordPress site, but the text within the variable is not being recognized by WPML for translation.
Solution:
The strings you are attempting to translate are not following the WordPress localization standards, which is why WPML cannot register them for translation. To resolve this, you need to modify your code to adhere to these standards. Here is how you can update your code:
_e( 'Congratulations! Shipping is on us :', 'my-theme' )
_n('Free delivery on orders of %s or more.', wc_price( $min_amount ), 'my-theme' )
After updating, ensure to perform a full site backup. Then, scan the theme for the strings to translate by following the instructions here: Scanning the theme or plugin.
If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also advise checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.