
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on October 13, 2020, 11:49
Hello
Try to use $price = $product->get_price('view'); OR $price = $product->get_price('edit');
Hello
Try to use $price = $product->get_price('view'); OR $price = $product->get_price('edit');

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on October 14, 2020, 10:44
Hello
Very strange! My plugin inserts fixed prices in the same function as conversion.
In other words, if there is no fixed price, then there should be no conversion.
Code to get fixed price:
global $WOOCS;
if ($WOOCS->is_fixed_enabled) {
if ($WOOCS->is_multiple_allowed AND $product !== NULL AND is_object($product)) {
//if (isset($product->variation_id))
if ($product->is_type('variation')) {
$price = $WOOCS->_get_product_fixed_price($product, 'variation', $price, $precision);
} elseif ($product->is_type('variable')) {
$price = -1;
} else {
$price = $WOOCS->_get_product_fixed_price($product, 'single', $price, $precision);
}}
}
Hello
Very strange! My plugin inserts fixed prices in the same function as conversion.
In other words, if there is no fixed price, then there should be no conversion.
Code to get fixed price:
global $WOOCS;
if ($WOOCS->is_fixed_enabled) {
if ($WOOCS->is_multiple_allowed AND $product !== NULL AND is_object($product)) {
//if (isset($product->variation_id))
if ($product->is_type('variation')) {
$price = $WOOCS->_get_product_fixed_price($product, 'variation', $price, $precision);
} elseif ($product->is_type('variable')) {
$price = -1;
} else {
$price = $WOOCS->_get_product_fixed_price($product, 'single', $price, $precision);
}}
}

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on October 16, 2020, 11:20
Hello
Yes it can cause a problem. Because the fixed prices have a key with the ID of the products, in this case ID of variation
In any case : you want to use the custom code I gave above
Or take any product variant and get a fixed price from that variant
Hello
Yes it can cause a problem. Because the fixed prices have a key with the ID of the products, in this case ID of variation
In any case : you want to use the custom code I gave above
Or take any product variant and get a fixed price from that variant

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on October 19, 2020, 10:07
Hello
Great! Welcome;)
Hello
Great! Welcome;)