Este usuário não tem tópicos favoritos.
Tópicos favoritos do fórum
Tópicos do fórum criados
| Status |
Tópico
|
Suporte | Vozes | Posts | Atualidade |
|---|---|---|---|---|---|
|
Moneda dollar, pero con variación por países
Iniciado por: michelleG-8
em: Soporte en español
Problema: /**
* Change a currency symbol for specific countries using WPML hooks
*/
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
// Get the current country using WPML
$current_country = apply_filters('wpml_current_language', NULL);
if ($currency === 'USD') {
// Customize currency symbol based on country
if ($current_country === 'br') { // Brazil
$currency_symbol = 'USD R$';
} elseif ($current_country === 'co') { // Colombia
$currency_symbol = 'USD COL$';
} else {
$currency_symbol = 'USD'; // Default for other countries
}
}
return $currency_symbol;
}Además, se sugiere utilizar el complemento WooCommerce Product Price Based on Countries para gestionar precios diferenciados por país. |
|
0 | 7 | 1 ano, 2 meses atrás | |
|
Uncaught Error: Class 'YITH_WAPO_WPML' not found
Iniciado por: michelleG-8 em: Soporte en español |
|
2 | 2 | 4 anos, 1 mês atrás |