rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -282,6 +282,7 @@ class WC_Webhook_Data_Store implements WC_Webhook_Data_Store_Interface {
$exclude = '';
$date_created = '';
$date_modified = '';
$user_id = '';
if ( ! empty( $args['include'] ) ) {
$args['include'] = implode( ',', wp_parse_id_list( $args['include'] ) );
@@ -293,6 +294,10 @@ class WC_Webhook_Data_Store implements WC_Webhook_Data_Store_Interface {
$exclude = 'AND webhook_id NOT IN (' . $args['exclude'] . ')';
}
if ( ! empty( $args['user_id'] ) ) {
$user_id = $wpdb->prepare( 'AND `user_id` = %d', absint( $args['user_id'] ) );
}
if ( ! empty( $args['after'] ) || ! empty( $args['before'] ) ) {
$args['after'] = empty( $args['after'] ) ? '0000-00-00' : $args['after'];
$args['before'] = empty( $args['before'] ) ? current_time( 'mysql', 1 ) : $args['before'];
@@ -326,6 +331,7 @@ class WC_Webhook_Data_Store implements WC_Webhook_Data_Store_Interface {
{$exclude}
{$date_created}
{$date_modified}
{$user_id}
{$order}
{$limit}
{$offset}"
@@ -349,6 +355,7 @@ class WC_Webhook_Data_Store implements WC_Webhook_Data_Store_Interface {
{$exclude}
{$date_created}
{$date_modified}
{$user_id}
{$order}
{$limit}
{$offset}"