Changeset 3454305
- Timestamp:
- 02/05/2026 07:07:23 AM (8 weeks ago)
- Location:
- e-commerce-data-interchange
- Files:
-
- 8 edited
- 1 copied
-
tags/5.1.1 (copied) (copied from e-commerce-data-interchange/trunk)
-
tags/5.1.1/e-commerce-data-interchange.php (modified) (1 diff)
-
tags/5.1.1/readme.txt (modified) (2 diffs)
-
tags/5.1.1/src/Matchers/ProductMatcher.php (modified) (6 diffs)
-
tags/5.1.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/e-commerce-data-interchange.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Matchers/ProductMatcher.php (modified) (6 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
e-commerce-data-interchange/tags/5.1.1/e-commerce-data-interchange.php
r3454088 r3454305 4 4 * Plugin URI: https://ediplugin.org/ 5 5 * Description: The plugin provides data interchange between the WooCommerce plugin and 1С. 6 * Version: 5.1. 06 * Version: 5.1.1 7 7 * Author: Aleksandr Levashov <aleksandr@byteperfect.dev> 8 8 * Author URI: https://ediplugin.org/ -
e-commerce-data-interchange/tags/5.1.1/readme.txt
r3454088 r3454305 6 6 Tested up to: 6.9.1 7 7 Requires PHP: 7.4 8 Stable tag: 5.1. 08 Stable tag: 5.1.1 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 84 84 == Changelog == 85 85 86 = 5.1.1 = 87 Дата релиза: 05 февраля 2026 88 - Исправлена ошибка сопоставления товаров. 89 86 90 = 5.1.0 = 87 91 Дата релиза: 04 февраля 2026 -
e-commerce-data-interchange/tags/5.1.1/src/Matchers/ProductMatcher.php
r3416737 r3454305 5 5 6 6 7 use BytePerfect\EDI\EDI; 7 8 use Exception; 8 9 … … 27 28 28 29 $product_id = self::get_product_id_by_sku( $sku, $parent_product_id ); 29 if ( $product_id ) {30 if ( $product_id && ! self::product_has_guid( $product_id ) ) { 30 31 self::update_product_match_meta( 31 32 $product_id, … … 39 40 40 41 $product_id = self::get_product_id_by_name( $name, $parent_product_id ); 41 if ( $product_id ) {42 if ( $product_id && ! self::product_has_guid( $product_id ) ) { 42 43 self::update_product_match_meta( 43 44 $product_id, … … 50 51 } 51 52 52 return $product_id;53 return null; 53 54 } 54 55 … … 84 85 85 86 return is_string( $product_map_key ) ? $product_map_key : '_edi_1c_guid'; 87 } 88 89 90 protected static function product_has_guid( int $product_id ): bool { 91 $existing_guid = get_post_meta( $product_id, self::get_product_map_key(), true ); 92 return ! empty( $existing_guid ); 86 93 } 87 94 … … 166 173 update_post_meta( $product_id, '_edi_guid_match_source', $source ); 167 174 update_post_meta( $product_id, '_edi_guid_match_synced_at', $timestamp ); 175 176 EDI::log()->debug( 177 sprintf( 178 179 __( 'Product was matched by %s. GUID %s, Product ID %d.', 'edi' ), 180 $source, 181 $guid, 182 $product_id 183 ) 184 ); 168 185 } 169 186 } -
e-commerce-data-interchange/tags/5.1.1/vendor/composer/installed.php
r3454088 r3454305 2 2 'root' => array( 3 3 'name' => 'byteperfect/edi', 4 'pretty_version' => 'v5.1. 0',5 'version' => '5.1. 0.0',6 'reference' => ' 290e18fdbf297dab4a0cfd6064f7a6b8f1789eaf',4 'pretty_version' => 'v5.1.1', 5 'version' => '5.1.1.0', 6 'reference' => 'b11cc232b8a1f60d12c0acf470e977e7bb3443d9', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'byteperfect/edi' => array( 14 'pretty_version' => 'v5.1. 0',15 'version' => '5.1. 0.0',16 'reference' => ' 290e18fdbf297dab4a0cfd6064f7a6b8f1789eaf',14 'pretty_version' => 'v5.1.1', 15 'version' => '5.1.1.0', 16 'reference' => 'b11cc232b8a1f60d12c0acf470e977e7bb3443d9', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
e-commerce-data-interchange/trunk/e-commerce-data-interchange.php
r3454088 r3454305 4 4 * Plugin URI: https://ediplugin.org/ 5 5 * Description: The plugin provides data interchange between the WooCommerce plugin and 1С. 6 * Version: 5.1. 06 * Version: 5.1.1 7 7 * Author: Aleksandr Levashov <aleksandr@byteperfect.dev> 8 8 * Author URI: https://ediplugin.org/ -
e-commerce-data-interchange/trunk/readme.txt
r3454088 r3454305 6 6 Tested up to: 6.9.1 7 7 Requires PHP: 7.4 8 Stable tag: 5.1. 08 Stable tag: 5.1.1 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 84 84 == Changelog == 85 85 86 = 5.1.1 = 87 Дата релиза: 05 февраля 2026 88 - Исправлена ошибка сопоставления товаров. 89 86 90 = 5.1.0 = 87 91 Дата релиза: 04 февраля 2026 -
e-commerce-data-interchange/trunk/src/Matchers/ProductMatcher.php
r3416737 r3454305 5 5 6 6 7 use BytePerfect\EDI\EDI; 7 8 use Exception; 8 9 … … 27 28 28 29 $product_id = self::get_product_id_by_sku( $sku, $parent_product_id ); 29 if ( $product_id ) {30 if ( $product_id && ! self::product_has_guid( $product_id ) ) { 30 31 self::update_product_match_meta( 31 32 $product_id, … … 39 40 40 41 $product_id = self::get_product_id_by_name( $name, $parent_product_id ); 41 if ( $product_id ) {42 if ( $product_id && ! self::product_has_guid( $product_id ) ) { 42 43 self::update_product_match_meta( 43 44 $product_id, … … 50 51 } 51 52 52 return $product_id;53 return null; 53 54 } 54 55 … … 84 85 85 86 return is_string( $product_map_key ) ? $product_map_key : '_edi_1c_guid'; 87 } 88 89 90 protected static function product_has_guid( int $product_id ): bool { 91 $existing_guid = get_post_meta( $product_id, self::get_product_map_key(), true ); 92 return ! empty( $existing_guid ); 86 93 } 87 94 … … 166 173 update_post_meta( $product_id, '_edi_guid_match_source', $source ); 167 174 update_post_meta( $product_id, '_edi_guid_match_synced_at', $timestamp ); 175 176 EDI::log()->debug( 177 sprintf( 178 179 __( 'Product was matched by %s. GUID %s, Product ID %d.', 'edi' ), 180 $source, 181 $guid, 182 $product_id 183 ) 184 ); 168 185 } 169 186 } -
e-commerce-data-interchange/trunk/vendor/composer/installed.php
r3454088 r3454305 2 2 'root' => array( 3 3 'name' => 'byteperfect/edi', 4 'pretty_version' => 'v5.1. 0',5 'version' => '5.1. 0.0',6 'reference' => ' 290e18fdbf297dab4a0cfd6064f7a6b8f1789eaf',4 'pretty_version' => 'v5.1.1', 5 'version' => '5.1.1.0', 6 'reference' => 'b11cc232b8a1f60d12c0acf470e977e7bb3443d9', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'byteperfect/edi' => array( 14 'pretty_version' => 'v5.1. 0',15 'version' => '5.1. 0.0',16 'reference' => ' 290e18fdbf297dab4a0cfd6064f7a6b8f1789eaf',14 'pretty_version' => 'v5.1.1', 15 'version' => '5.1.1.0', 16 'reference' => 'b11cc232b8a1f60d12c0acf470e977e7bb3443d9', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.