ผู้ใช้นี้ไม่มีหัวข้อที่ชื่นชอบ.
หัวข้อฟอรัมที่ชื่นชอบ
หัวข้อฟอรัมที่สร้าง
| สถานะ |
หัวข้อ
|
ผู้สนับสนุน | เสียง | โพสต์ | ความใหม่ |
|---|---|---|---|---|---|
|
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, 1 month มาแล้ว | |
|
Uncaught Error: Class 'YITH_WAPO_WPML' not found
เริ่มโดย: michelleG-8 ใน: Soporte en español |
|
2 | 2 | 4 years มาแล้ว |