PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.19
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.19
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 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
← All changes | includes/Services/Receipt_Store_Resolver.php +1 -16 1.10.141.10.19 View file →
@@ -332,24 +332,9 @@
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 - $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 - );
336 + return Receipt_Sections::label_tax_ids( $tax_ids, 'store', $locale );
352 337 }
353 338
354 339 /**
355 340 * Resolve an optional free-text store field, treating a blank value as unset.