Plugin Directory

Changeset 3437579


Ignore:
Timestamp:
01/12/2026 10:25:02 AM (3 months ago)
Author:
assafadscale
Message:

WP_Query order date filtering now uses full-day boundaries

Location:
adscale-ai/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • adscale-ai/trunk/adscale-ai.php

    r3435129 r3437579  
    88 * Plugin URI: https://www.adscale.com/integration/#woocommerce
    99 * Description: AdScale plugin allows you to automate Ecommerce advertising across all channels and drive more sales to your store. Easily create, manage & optimize ads on one platform.
    10  * Version: 2.2.13
     10 * Version: 2.2.14
    1111 * Author: AdScale LTD
    1212 * Author URI: https://www.adscale.com
     
    2323defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
    2424use AdScale\App;
    25 define( 'ADSCALE_INTERNAL_MODULE_VERSION', 'v20260108-M' );
     25define( 'ADSCALE_INTERNAL_MODULE_VERSION', 'v20260112-M' );
    2626define( 'ADSCALE_PLUGIN_DIR', __DIR__ );
    2727define( 'ADSCALE_PLUGIN_FILE', __FILE__ );
  • adscale-ai/trunk/changelog.txt

    r3435129 r3437579  
    11*** AdScale AI Changelog ***
     2
     32026-01-12 - version 2.2.14
     4* Fix: WP_Query order date filtering now uses full-day boundaries (00:00:00–23:59:59) and inclusive ranges.
    25
    362026-01-08 - version 2.2.13
  • adscale-ai/trunk/readme.txt

    r3435129 r3437579  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.2.13
     7Stable tag: 2.2.14
    88License: GPL-2.0+
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • adscale-ai/trunk/src/PluginApi/Orders.php

    r3435129 r3437579  
    394394
    395395        if ($start || $end) {
    396             $args['date_query'] = [];
     396            // Initialize date_query and make the bounds inclusive.
     397            $args['date_query'] = array(
     398                'inclusive' => true,
     399            );
    397400
    398401            if ($start) {
    399                 $args['date_query'][] = ['column' => 'post_date', 'after' => $start];
     402                // From start of day (site timezone)
     403                $args['date_query'][] = array(
     404                    'column' => 'post_date',
     405                    'after'  => $start . ' 00:00:00',
     406                );
    400407            }
    401408
    402409            if ($end) {
    403                 $args['date_query'][] = ['column' => 'post_date', 'before' => $end];
     410                // Until end of day (site timezone)
     411                $args['date_query'][] = array(
     412                    'column' => 'post_date',
     413                    'before' => $end . ' 23:59:59',
     414                );
    404415            }
    405416        }
Note: See TracChangeset for help on using the changeset viewer.