Use WooCommerce store currency for product and order money.
Deploy Ladill Woo Manager / deploy (push) Successful in 35s

Sync currency from the plugin, format product prices and totals with it, and show the store currency on product price fields instead of hard-coding GHS.
This commit is contained in:
isaacclad
2026-07-24 15:38:07 +00:00
parent f7eed690ab
commit e709de6593
9 changed files with 234 additions and 9 deletions
+7 -1
View File
@@ -30,7 +30,13 @@ class OrderIngestService
->all();
$totalMinor = (int) round(((float) ($payload['total'] ?? 0)) * 100);
$currency = strtoupper((string) ($payload['currency'] ?? 'GHS'));
$currency = strtoupper(trim((string) ($payload['currency'] ?? '')));
if (preg_match('/^[A-Z]{3}$/', $currency) !== 1) {
$currency = $store->currency();
}
if ($currency === '') {
$currency = 'XXX';
}
$wcUpdatedAt = isset($payload['date_modified_gmt'])
? Carbon::parse($payload['date_modified_gmt'].' UTC')