Ecommerce Shopify WordPress Discussion

Woocommerce sale shortcode not showing all updated products from dokan wordpress

We have dokan + woocommerce running platform. Currently when user update sale price from vendor dashboard dokan, its not showing in sale page. Apparently, it shows only product that updates from woocommerce directly. So i created custom sale shortcode but still it works like that not showing all sale products. Below, I attach the custom Shortcode. Meanwhile may I know is there any way can make WooCommerce update the products from third party plugin? if( ! function_exists('get_preordable_products') ) { function get_preordable_products( $atts ) { // Shortcode Attributes extract( shortcode_atts( array( 'columns' => '4', 'limit' => '20', ), $atts, 'preordable_products' ) ); // The WP_Query $query = new WP_Query( array ( 'post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => $limit, ) ); global $woocommerce_loop; $woocommerce_loop['columns'] = $columns; $woocommerce_loop['is_shortcode'] = 1; $woocommerce_loop['total'] = $query->post_count; $woocommerce_loop['total_pages'] = $query->max_num_pages; $woocommerce_loop['per_page'] = $limit; ob_start(); if ( $query->have_posts() ) { woocommerce_product_loop_start(); while ( $query->have_posts() ) { $query->the_post(); $id = get_the_ID(); $_product = wc_get_product(); if($_product->is_on_sale()){ wc_get_template_part( 'content', 'product' ); } } woocommerce_product_loop_end(); woocommerce_reset_loop(); wp_reset_postdata(); } else { do_action( "woocommerce_shortcode_products_loop_no_results", $atts ); echo '<p>'. __("Aucun article disponible à la précommande.") . '</p>'; } $content = ob_get_clean(); return '<div class="woocommerce columns-' . $columns . '">' . $content . '</div>'; } add_shortcode( 'preordable_products', 'get_preordable_products' ); }
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.