rebase on oct-10-2023
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user