Skip to content

Commit

Permalink
⚡️HPOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Aug 28, 2023
1 parent f467977 commit 9e16525
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions includes/Processors/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static function get_items( $plugin, $number, $offset ) {

switch ( $plugin ) {
case 'wcfmmarketplace':
$orders = [];
$wcfm_orders = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT order_id FROM {$wpdb->prefix}wcfm_marketplace_orders LIMIT %d OFFSET %d", $number, $offset ), ARRAY_A );
$wcfm_orders = array_map(
function ( $item ) {
Expand All @@ -69,11 +70,13 @@ function ( $item ) {
$wcfm_orders
);

$orders = dokan()->order->all(
[
'include' => $wcfm_orders,
]
);
if ( ! empty( $wcfm_orders ) ) {
$orders = dokan()->order->all(
[
'include' => $wcfm_orders,
]
);
}
break;

default:
Expand Down

0 comments on commit 9e16525

Please sign in to comment.