Skip to content

Commit

Permalink
⚡️Fix: exclude dokan orders, migrate wcfm orders only.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Aug 28, 2023
1 parent f915005 commit 9ef1651
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/Processors/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ public static function get_items( $plugin, $number, $offset ) {
'parent' => 0,
);

switch ( $plugin ) {
case 'wcfmmarketplace':
switch ( $plugin ) {
case 'wcfmmarketplace':
$wcfm_orders = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT order_id FROM {$wpdb->prefix}wcfm_marketplace_orders LIMIT %d OFFSET {$offset}", $number ), ARRAY_A );

Check failure on line 64 in includes/Processors/Order.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Use placeholders and $wpdb->prepare(); found interpolated variable $offset at "SELECT DISTINCT order_id FROM {$wpdb->prefix}wcfm_marketplace_orders LIMIT %d OFFSET {$offset}"
$wcfm_orders = array_map( function ( $item ) {

Check failure on line 65 in includes/Processors/Order.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening parenthesis of a multi-line function call must be the last content on the line
return $item['order_id'];
}, $wcfm_orders );

Check failure on line 67 in includes/Processors/Order.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Closing parenthesis of a multi-line function call must be on a line by itself

$orders = dokan()->order->all( [ 'include' => $wcfm_orders ] );
break;
break;

default:
default:
$orders = [];
}
}

if ( empty( $orders ) ) {
self::throw_error();
Expand Down

0 comments on commit 9ef1651

Please sign in to comment.