$limit, 'return' => 'ids', 'type' => 'shop_order', // meta_key/meta_value, not meta_query: the legacy (posts) order // store rejects meta_query with a "called incorrectly" notice. 'meta_key' => self::META, // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- small, admin-only. 'meta_value' => 'yes', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value ) ); return array_map( 'absint', (array) $ids ); } /** * Notice on our screens and the plugins screen while both forms are on. * * @return void */ public static function notice() { if ( ! current_user_can( 'manage_woocommerce' ) || ! Settings::get( 'withdrawal_enabled' ) || ! self::enabled() ) { return; } $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; if ( ! Admin::is_our_screen() && ! ( $screen && 'plugins' === $screen->id ) ) { return; } printf( '

%1$s %2$s

%4$s

', esc_html__( 'Two withdrawal forms are switched on.', 'returnkit' ), esc_html__( 'WooCommerce\'s basic "Order withdrawal" feature is also active, so customers could find two different forms, and requests sent through WooCommerce\'s form don\'t appear in ReturnKit. Switch the WooCommerce feature off and use ReturnKit\'s, which covers the same legal requirements plus order and item selection, spam protection and an audit log.', 'returnkit' ), esc_url( self::settings_url() ), esc_html__( 'Open WooCommerce features', 'returnkit' ) ); } }