Skip to content

Commit

Permalink
fix: dont try to get orders if Woo is not active (#3649)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogermani authored Dec 23, 2024
1 parent 69156bf commit 608f017
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public static function init(): void {
* @param array $results Results to be merged with new results.
*/
public static function get_order_duplicates( $cutoff_time, $current_page = 0, $results = [] ): array {

if ( ! function_exists( 'wc_get_orders' ) ) {
return [];
}

$per_page = 100;
$order_result = wc_get_orders(
[
Expand Down

0 comments on commit 608f017

Please sign in to comment.