Title: kullar's Replies | WordPress.org

---

# kullar

  [  ](https://wordpress.org/support/users/kullar/)

 *   [Profile](https://wordpress.org/support/users/kullar/)
 *   [Topics Started](https://wordpress.org/support/users/kullar/topics/)
 *   [Replies Created](https://wordpress.org/support/users/kullar/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/kullar/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/kullar/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/kullar/engagements/)
 *   [Favorites](https://wordpress.org/support/users/kullar/favorites/)

 Search replies:

## Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/page/2/#post-12505324)
 * I got it solved(I started to edit plugin files and printed variables out), but
   I think that there still exists some overlap between variables ID and products
   id’s if they match or something like that. It is not logical that this line difference
   affects price.
 * How I got sovled:
 *     ```
       $id = get_the_ID();
       $product = wc_get_product($id);
       $price = $product->get_price(); //If I move this price line inside not variable then prices are correct and also discounts.
   
       if (!$product->is_type('variable')) {
        //move price line to here and everything is correct
        //$price = $product->get_price();
       } else {
        $variations = $product->get_available_variations();
        foreach ($variations as $variation){	
          $product_variation  = new WC_Product_Variation($variation['variation_id']);
          $price              = $product_variation->get_price();
        }
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12505120)
 * Any updates?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12484240)
 * Do you have any timeplan when it would be fixed? We would like to launch shop
   beginning in march, but this plugin is major fallback.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12459228)
 * Are there any updates?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12389349)
 * [@ijasacodez](https://wordpress.org/support/users/ijasacodez/) Could you give
   me your email where I can send private link with theme and db backup?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12374643)
 * Hi! Can I do something more to help you with this issue?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12342363)
 * Hi!
 * I updated code and added some print_r to code.
 * [https://testshop.telescope.ee/product-category/kanalisatsioon-tarvikud/valiskanalisatsioon/vk-torud/](https://testshop.telescope.ee/product-category/kanalisatsioon-tarvikud/valiskanalisatsioon/vk-torud/)
 * Variation_id:2342
    new WC_Product_Variation(2342) get_price_html():2.30 € 2.07
   € get_price():2.07 get_regular_price(‘edit’):17.50 get_regular_price():2.07 get_sale_price():
 * [https://photos.app.goo.gl/aLbdyubpuKPwmsiu5](https://photos.app.goo.gl/aLbdyubpuKPwmsiu5)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12264637)
 * I have custom theme and I have tried several discount plugins before that(when
   I install back these plugins then settings are remembered – might there be an
   issue?), but it affects only this 1 variation. Other products are in the same
   loop. Product Id is correct, variation id is correct, but price is wrong.
 * Plugins list: [https://photos.app.goo.gl/ti1uK77ij4KX7cre7](https://photos.app.goo.gl/ti1uK77ij4KX7cre7)
 *     ```
       $product_variation  = new WC_Product_Variation($variation_id);
       ```
   
 * This gives back price with wrong price(print_r(product_variation)) and also I
   have wrong price in products list(admin side).
 * I is possible me to print_r some results and paste here?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dynamic Pricing With Discount Rules for WooCommerce] 1 variation price is wrong](https://wordpress.org/support/topic/1-variation-price-is-wrong/)
 *  Thread Starter [kullar](https://wordpress.org/support/users/kullar/)
 * (@kullar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/1-variation-price-is-wrong/#post-12257212)
 * There are no other sales going on.
 * [https://photos.app.goo.gl/aLbdyubpuKPwmsiu5](https://photos.app.goo.gl/aLbdyubpuKPwmsiu5)

Viewing 9 replies - 1 through 9 (of 9 total)