Changeset 3234837
- Timestamp:
- 02/04/2025 03:24:18 PM (14 months ago)
- Location:
- datafeedr-product-sets
- Files:
-
- 8 edited
- 1 copied
-
tags/1.3.24 (copied) (copied from datafeedr-product-sets/trunk)
-
tags/1.3.24/classes/class-dfrps-update.php (modified) (1 diff)
-
tags/1.3.24/datafeedr-product-sets.php (modified) (2 diffs)
-
tags/1.3.24/functions/integration.php (modified) (1 diff)
-
tags/1.3.24/readme.txt (modified) (2 diffs)
-
trunk/classes/class-dfrps-update.php (modified) (1 diff)
-
trunk/datafeedr-product-sets.php (modified) (2 diffs)
-
trunk/functions/integration.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
datafeedr-product-sets/tags/1.3.24/classes/class-dfrps-update.php
r2866495 r3234837 12 12 */ 13 13 private $temp_product_table; 14 15 public $action; 16 public $set; 17 public $config; 18 public $meta; 19 public $phase; 14 20 15 21 public function __construct( $post ) { -
datafeedr-product-sets/tags/1.3.24/datafeedr-product-sets.php
r3113238 r3234837 10 10 Requires PHP: 7.4 11 11 Requires at least: 3.8 12 Tested up to: 6. 6-RC213 Version: 1.3.2 312 Tested up to: 6.7 13 Version: 1.3.24 14 14 15 15 Datafeedr Product Sets Plugin 16 Copyright (C) 202 4, Datafeedr - [email protected]16 Copyright (C) 2025, Datafeedr - [email protected] 17 17 18 18 This program is free software: you can redistribute it and/or modify … … 38 38 * Define constants. 39 39 */ 40 define( 'DFRPS_VERSION', '1.3.2 3' );40 define( 'DFRPS_VERSION', '1.3.24' ); 41 41 define( 'DFRPS_DB_VERSION', '1.2.0' ); 42 42 define( 'DFRPS_SET_VERSION', '1.2.0' ); -
datafeedr-product-sets/tags/1.3.24/functions/integration.php
r2249373 r3234837 206 206 } 207 207 208 $post = dfrps_get_post_by_product_id( $product['_id'], $post_type, true ); 208 /** 209 * Filters the key used to retrieve an existing post ID. 210 * 211 * This filter allows modifying the key that is used to check for an existing post (ie. WC_Product) 212 * associated with a product. By default, it is set to '_id'. 213 * 214 * @since 1.3.24 215 * 216 * @param string $key The default key used to check for an existing post ID. Default '_id'. 217 * @param mixed $product The Datafeedr Product array being processed. 218 * @param mixed $set Product Set array. 219 * 220 * @return string The modified key used for retrieving an existing post ID. 221 */ 222 $key = apply_filters( 'dfrps_get_existing_post_id_key', '_id', $product, $set ); 223 224 $post = dfrps_get_post_by_product_id( $product[ $key ], $post_type, true ); 209 225 210 226 // Return "skip" if the product is already in $imported_product_ids AND $post is null/false (which means it was imported but not yet queryable). 211 if ( in_array( $product[ '_id'], $imported_product_ids ) && ! $post ) {227 if ( in_array( $product[ $key ], $imported_product_ids ) && ! $post ) { 212 228 return 'skip'; 213 229 } 214 230 215 $imported_product_ids[] = $product['_id']; 231 // If a $post was found, use the $key to get the ID otherwise use the default '_id' field. 232 $imported_product_ids[] = ( $post ) ? $product[ $key ] : $product['_id']; 216 233 217 234 return $post; -
datafeedr-product-sets/tags/1.3.24/readme.txt
r3113238 r3234837 7 7 Requires PHP: 7.4 8 8 Requires at least: 3.8 9 Tested up to: 6. 6-RC210 Stable tag: 1.3.2 39 Tested up to: 6.7 10 Stable tag: 1.3.24 11 11 12 12 Build sets of products to import into your website. … … 82 82 83 83 == Changelog == 84 85 = 1.3.24 - 2025/02/04 = 86 * Added property declarations to `Dfrps_Update` class. 87 * Added new filter hook inside `dfrps_get_existing_post()`` so that the ID key being used to look up a product can be overridden. 84 88 85 89 = 1.3.23 - 2024/07/05 = -
datafeedr-product-sets/trunk/classes/class-dfrps-update.php
r2866495 r3234837 12 12 */ 13 13 private $temp_product_table; 14 15 public $action; 16 public $set; 17 public $config; 18 public $meta; 19 public $phase; 14 20 15 21 public function __construct( $post ) { -
datafeedr-product-sets/trunk/datafeedr-product-sets.php
r3113238 r3234837 10 10 Requires PHP: 7.4 11 11 Requires at least: 3.8 12 Tested up to: 6. 6-RC213 Version: 1.3.2 312 Tested up to: 6.7 13 Version: 1.3.24 14 14 15 15 Datafeedr Product Sets Plugin 16 Copyright (C) 202 4, Datafeedr - [email protected]16 Copyright (C) 2025, Datafeedr - [email protected] 17 17 18 18 This program is free software: you can redistribute it and/or modify … … 38 38 * Define constants. 39 39 */ 40 define( 'DFRPS_VERSION', '1.3.2 3' );40 define( 'DFRPS_VERSION', '1.3.24' ); 41 41 define( 'DFRPS_DB_VERSION', '1.2.0' ); 42 42 define( 'DFRPS_SET_VERSION', '1.2.0' ); -
datafeedr-product-sets/trunk/functions/integration.php
r2249373 r3234837 206 206 } 207 207 208 $post = dfrps_get_post_by_product_id( $product['_id'], $post_type, true ); 208 /** 209 * Filters the key used to retrieve an existing post ID. 210 * 211 * This filter allows modifying the key that is used to check for an existing post (ie. WC_Product) 212 * associated with a product. By default, it is set to '_id'. 213 * 214 * @since 1.3.24 215 * 216 * @param string $key The default key used to check for an existing post ID. Default '_id'. 217 * @param mixed $product The Datafeedr Product array being processed. 218 * @param mixed $set Product Set array. 219 * 220 * @return string The modified key used for retrieving an existing post ID. 221 */ 222 $key = apply_filters( 'dfrps_get_existing_post_id_key', '_id', $product, $set ); 223 224 $post = dfrps_get_post_by_product_id( $product[ $key ], $post_type, true ); 209 225 210 226 // Return "skip" if the product is already in $imported_product_ids AND $post is null/false (which means it was imported but not yet queryable). 211 if ( in_array( $product[ '_id'], $imported_product_ids ) && ! $post ) {227 if ( in_array( $product[ $key ], $imported_product_ids ) && ! $post ) { 212 228 return 'skip'; 213 229 } 214 230 215 $imported_product_ids[] = $product['_id']; 231 // If a $post was found, use the $key to get the ID otherwise use the default '_id' field. 232 $imported_product_ids[] = ( $post ) ? $product[ $key ] : $product['_id']; 216 233 217 234 return $post; -
datafeedr-product-sets/trunk/readme.txt
r3113238 r3234837 7 7 Requires PHP: 7.4 8 8 Requires at least: 3.8 9 Tested up to: 6. 6-RC210 Stable tag: 1.3.2 39 Tested up to: 6.7 10 Stable tag: 1.3.24 11 11 12 12 Build sets of products to import into your website. … … 82 82 83 83 == Changelog == 84 85 = 1.3.24 - 2025/02/04 = 86 * Added property declarations to `Dfrps_Update` class. 87 * Added new filter hook inside `dfrps_get_existing_post()`` so that the ID key being used to look up a product can be overridden. 84 88 85 89 = 1.3.23 - 2024/07/05 =
Note: See TracChangeset
for help on using the changeset viewer.