此用户没有收藏的主题。
收藏的论坛主题
创建的论坛主题
| 状态 |
主题
|
支持人员 | 参与者 | 帖子 | 最新活动 |
|---|---|---|---|---|---|
|
Moneda dollar, pero con variación por países
发起人:michelleG-8
在: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 year, 2 months前 | |
| Uncaught Error: Class 'YITH_WAPO_WPML' not found |
|
2 | 2 | 4 years, 1 month前 |