PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Display fixed price

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Im using Learnpress and Woocommerce in my page, I know that currently the plugin doesnt support learnpress for fixed prices but I want to know if there is a way that via code I can get the fixed price of my product in woocommerce and display it on my course page. please help me as I cant find a shortcode or"get" code that works. I just want to know how to get the fixed price of a product and show it in a page.

Hello

Here is a sample code to get fixed prices

globalĀ  $WOOCS;

if ($WOOCS->is_fixed_enabled) {
if ($WOOCS->is_multiple_allowed AND $product !== NULL AND is_object($product)) {

if ($product->is_type('variation')) {

$tmp_val = $WOOCS->_get_product_fixed_price($product, 'variation', $price, $precision);
} elseif ($product->is_type('variable')) {
$tmp_val = -1;
} else {
$tmp_val = $WOOCS->_get_product_fixed_price($product, 'single', $price, $precision);
}

if ((int) $tmp_val !== -1) {
$price = apply_filters('woocs_fixed_raw_woocommerce_price', $tmp_val, $product, $price);
}
}
}

return $price;

 

Thank you so much for the reply! I applied this code in my php files where i get the prices but it only worked to show the regular prices in USD, i need to show the fixed prices I set up for PEN. how can I do that?

This is the screenshot of the fixed prices of a course: https://drive.google.com/file/d/1fk5nxvXZR7y-uuqlOzobXSZNBKCuMYeK/view?usp=sharing

This is the screenshot of the prices that are showing in that course page after using the code you gave me: https://drive.google.com/file/d/1sW8F9cDOPYPBF5W8iZSd48N88POhgNKS/view?usp=sharing

Thank you for your help!

Hello

To implement this code into your custom functionality, you should hire a developer. On our side I gave all the information