PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.17
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.17
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
← All changes | includes/Services/Receipt_Store_Resolver.php +16 -1 1.10.21 → 1.10.17 View file →
@@ -332,9 +332,24 @@
332 332 * @param string $locale Receipt locale.
333 333 * @return array<int,array<string,mixed>>
334 334 */
335 335 public static function with_store_tax_id_labels( array $tax_ids, string $locale = '' ): array {
336 - return Receipt_Sections::label_tax_ids( $tax_ids, 'store', $locale );
336 + $labels = Receipt_I18n_Labels::get_labels( $locale );
337 +
338 + return array_map(
339 + static function ( array $tax_id ) use ( $labels ): array {
340 + if ( ! empty( $tax_id['label'] ) ) {
341 + return $tax_id;
342 + }
343 +
344 + $type = isset( $tax_id['type'] ) ? (string) $tax_id['type'] : 'other';
345 + $key = 'store_tax_id_label_' . $type;
346 + $tax_id['label'] = $labels[ $key ] ?? $labels['store_tax_id_label_other'];
347 +
348 + return $tax_id;
349 + },
350 + $tax_ids
351 + );
337 352 }
338 353
339 354 /**
340 355 * Resolve an optional free-text store field, treating a blank value as unset.