Additional Shortcodes for LearnDash – Course Price Shortcodes
Course Price Shortcode #
This shortcode displays the price of a LearnDash course. Some things to consider:
- If there is a valid product_id meta field in the course it will assume the price of the course is the price of the associated WooCommerce product, and show that price
- If the ID belongs to something other than a course, it will show an error message.
Course Price with Discount #
ea_ld_course_price_discount course_id="xx" discount="10"]
This shortcode displays the price of a LearnDash course with a manual discount attached to it if the user wants it, alongside a button.
Things to consider:
- This will show the price of a course with the same consideration as the shortcode above (the ‘product_id’ consideration).
- If a manual discount is in the parameter, then it will show that discount. If not, it will show if there is a product_id and the WooCommerce product has a sale price a.k.a it will show the “real” discount off the associated WooCommerce product.