Hi mshpmathura,
Thank you for your response!
Currently, LearnPress does not have a built-in feature to change the price when a student re-purchases a course. However, you can explore the hook lp/cart/calculate_total, located in the calculate_totals function inside wp-content/plugins/learnpress/inc/cart/class-lp-cart.php . This hook allows you to recalculate the price at the /lp-checkout/ page when a student re-purchases a course.
Regarding displaying the adjusted price, there are multiple places where the course price is shown across LearnPress, and they are spread out in different files. You may need to find the appropriate hooks in those areas.
For example, if you want to update the price on the single course page, you can look into the hook learn-press/course/html-price, located in wp-content/plugins/learnpress/inc/TemplateHooks/Course/SingleCourseTemplate.php
You can customize this in your child theme to ensure the updated price is displayed correctly.
Hope this helps!
Best regards,
Brianvu-tp