query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'krawlup_claim_%' OR option_name LIKE 'krawlup_refunded_%' OR option_name LIKE '_transient_krawlup_claim_%' OR option_name LIKE '_transient_timeout_krawlup_claim_%'" ); // Order-meta flags (_krawlup_tracked) live in postmeta on classic stores // and in the HPOS wc_orders_meta table on custom-order-table stores (the // table only exists where WooCommerce created it). $wpdb->query( "DELETE FROM {$wpdb->postmeta} WHERE meta_key = '_krawlup_tracked'" ); $orders_meta = $wpdb->prefix . 'wc_orders_meta'; if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $orders_meta ) ) === $orders_meta ) { $wpdb->query( "DELETE FROM {$orders_meta} WHERE meta_key = '_krawlup_tracked'" ); }