diff --git a/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php b/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php index 8fdabce5ac..0e12428c85 100644 --- a/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php +++ b/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php @@ -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( [