Hi!
I would like to leave out the pricing section in the create course part I have on my site. Is it possible to make a course free by default (without having to save the pricing section (this is the case now)).
Kind regards
@dantwah
This cannot be done using any custom code. For this you have to change in the original code which I don't recommend
Hi Diana,
Thanks for the reply. How about this solution?
I saw there is an action: do_action('wplms_front_end_save_course_pricing',$course_id);
I am guessing this is saving the course price. What if I would add this action when you clickt the save button in the course creation in the first stage (so point where you create the course in the first step, with title etc, or even in the settings tab).
I will set the setting of that the course is free by default and hide the pricing setting.
You think ik could work?
Kind regards
This reply has been marked as private.
Hi you have any update on this
@dantwah
Apologies from my side. Forgot to check this. Ping me once tomorrow
This reply has been marked as private.
This reply has been marked as private.
Thanks for checking!
I did change the default in the front-end plugin so by default it sets a course as free. It just only saves it as free when I click on save price settings.
With this set as default would it be possible?
I found a workaround!
I replace the course price setting to the general settings menu, and afterwards hide it with css. When saving the course settings it also saves that the course is free. This also hides the pricing section in general.
add_action('wplms_before_create_course_page', 'pricing_eerder');
function pricing_eerder() {
?>
jQuery(document).ready(function($){
var freecours = $(".vibe_vibe_course_free");
$(freecours).insertBefore('.vibe_vibe_course_prev_unit_quiz_lock');
});
<?php
}
.edit_course_content #course_settings .vibe_vibe_course_free {
display:none !important;
}
#course_creation_tabs .course_pricing {
display:none !important;
}
@dantwah,
If you are using css inside PHP then use it like this
<?php
//some code
?>
<style>
CSS Syling
</style>
<?php
your rest of the code
?>