Plugin Directory

Changeset 3234837


Ignore:
Timestamp:
02/04/2025 03:24:18 PM (14 months ago)
Author:
datafeedr.com
Message:

Update to version 1.3.24 from GitHub

Location:
datafeedr-product-sets
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • datafeedr-product-sets/tags/1.3.24/classes/class-dfrps-update.php

    r2866495 r3234837  
    1212     */
    1313    private $temp_product_table;
     14
     15    public $action;
     16    public $set;
     17    public $config;
     18    public $meta;
     19    public $phase;
    1420
    1521    public function __construct( $post ) {
  • datafeedr-product-sets/tags/1.3.24/datafeedr-product-sets.php

    r3113238 r3234837  
    1010Requires PHP: 7.4
    1111Requires at least: 3.8
    12 Tested up to: 6.6-RC2
    13 Version: 1.3.23
     12Tested up to: 6.7
     13Version: 1.3.24
    1414
    1515Datafeedr Product Sets Plugin
    16 Copyright (C) 2024, Datafeedr - [email protected]
     16Copyright (C) 2025, Datafeedr - [email protected]
    1717
    1818This program is free software: you can redistribute it and/or modify
     
    3838 * Define constants.
    3939 */
    40 define( 'DFRPS_VERSION', '1.3.23' );
     40define( 'DFRPS_VERSION', '1.3.24' );
    4141define( 'DFRPS_DB_VERSION', '1.2.0' );
    4242define( 'DFRPS_SET_VERSION', '1.2.0' );
  • datafeedr-product-sets/tags/1.3.24/functions/integration.php

    r2249373 r3234837  
    206206    }
    207207
    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 );
    209225
    210226    // 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 ) {
    212228        return 'skip';
    213229    }
    214230
    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'];
    216233
    217234    return $post;
  • datafeedr-product-sets/tags/1.3.24/readme.txt

    r3113238 r3234837  
    77Requires PHP: 7.4
    88Requires at least: 3.8
    9 Tested up to: 6.6-RC2
    10 Stable tag: 1.3.23
     9Tested up to: 6.7
     10Stable tag: 1.3.24
    1111
    1212Build sets of products to import into your website.
     
    8282
    8383== 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.
    8488
    8589= 1.3.23 - 2024/07/05 =
  • datafeedr-product-sets/trunk/classes/class-dfrps-update.php

    r2866495 r3234837  
    1212     */
    1313    private $temp_product_table;
     14
     15    public $action;
     16    public $set;
     17    public $config;
     18    public $meta;
     19    public $phase;
    1420
    1521    public function __construct( $post ) {
  • datafeedr-product-sets/trunk/datafeedr-product-sets.php

    r3113238 r3234837  
    1010Requires PHP: 7.4
    1111Requires at least: 3.8
    12 Tested up to: 6.6-RC2
    13 Version: 1.3.23
     12Tested up to: 6.7
     13Version: 1.3.24
    1414
    1515Datafeedr Product Sets Plugin
    16 Copyright (C) 2024, Datafeedr - [email protected]
     16Copyright (C) 2025, Datafeedr - [email protected]
    1717
    1818This program is free software: you can redistribute it and/or modify
     
    3838 * Define constants.
    3939 */
    40 define( 'DFRPS_VERSION', '1.3.23' );
     40define( 'DFRPS_VERSION', '1.3.24' );
    4141define( 'DFRPS_DB_VERSION', '1.2.0' );
    4242define( 'DFRPS_SET_VERSION', '1.2.0' );
  • datafeedr-product-sets/trunk/functions/integration.php

    r2249373 r3234837  
    206206    }
    207207
    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 );
    209225
    210226    // 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 ) {
    212228        return 'skip';
    213229    }
    214230
    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'];
    216233
    217234    return $post;
  • datafeedr-product-sets/trunk/readme.txt

    r3113238 r3234837  
    77Requires PHP: 7.4
    88Requires at least: 3.8
    9 Tested up to: 6.6-RC2
    10 Stable tag: 1.3.23
     9Tested up to: 6.7
     10Stable tag: 1.3.24
    1111
    1212Build sets of products to import into your website.
     
    8282
    8383== 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.
    8488
    8589= 1.3.23 - 2024/07/05 =
Note: See TracChangeset for help on using the changeset viewer.