'vi_wad_draft_product',
'post_status' => $status,
'order' => 'DESC',
'orderby' => 'meta_value_num',
'fields' => 'ids',
'posts_per_page' => $per_page,
'paged' => $paged,
'meta_query' => array(// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
'relation' => 'and',
array(
'key' => '_vi_wad_woo_id',
'compare' => 'exists',
)
),
);
$keyword = isset( $_GET['vi_wad_search'] ) ? sanitize_text_field( $_GET['vi_wad_search'] ) : '';// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$vi_wad_search_id = isset( $_GET['vi_wad_search_woo_id'] ) ? sanitize_text_field( $_GET['vi_wad_search_woo_id'] ) : '';// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( $vi_wad_search_id ) {
$args['meta_value'] = $vi_wad_search_id;// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
$args['posts_per_page'] = 1;
$keyword = '';
} else if ( $keyword ) {
$args['s'] = $keyword;
}
// $the_query = new WP_Query( $args );
$the_query = VI_WOO_ALIDROPSHIP_DATA::is_ald_table() ? new Ali_Product_Query( $args ) : new WP_Query( $args );
$count = $the_query->found_posts;
$total_page = $the_query->max_num_pages;
$paged = $total_page >= intval( $paged ) ? $paged : 1;
$product_count = $this->get_product_count();
if ( $the_query->have_posts() ) {
ob_start();
?>
posts as $product_id ) {
$product = Ali_Product_Table::get_post( $product_id );
$woo_product_id = Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_woo_id', true );
$title = $product->post_title;
$woo_product = wc_get_product( $woo_product_id );
$woo_product_status = '';
$woo_product_name = $title;
$sku = Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_sku', true );
$woo_sku = $sku;
if ( $woo_product ) {
$woo_sku = $woo_product->get_sku();
$woo_product_status = $woo_product->get_status();
$woo_product_name = $woo_product->get_name();
}
$gallery = Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_gallery', true );
$store_info = Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_store_info', true );
$image = wp_get_attachment_thumb_url( Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_product_image', true ) );
if ( ! $image ) {
$image = ( is_array( $gallery ) && count( $gallery ) ) ? array_shift( $gallery ) : '';
}
$variations = Ali_Product_Table::get_post_meta( $product_id, '_vi_wad_variations', true );
$overriding_product = VI_WOO_ALIDROPSHIP_DATA::get_overriding_product( $product_id );
$accordion_active = '';
if ( $overriding_product ) {
$accordion_active = 'active';
}
?>
' . $store_name . '';
}
?>
' . $overriding_product_title . '', 'Import list' )) //phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment ?>