Show Add to Cart Button on Single Course Page WPLMS V4

Add this code in wplms-customizer plugin>>wplms-customizer.php

add_action('wplms_4_the_course_button',function($course_id){

$product = get_post_meta($course_id,'vibe_product',true);
if(!empty($product)){

echo '<div class="course_add_to_cart">'.do_shortcode('[add_to_cart id="'.$product.'"]').'</div><style>.course_add_to_cart del,.course_add_to_cart ins{display:none}.course_add_to_cart p.product.woocommerce.add_to_cart_inline{display:grid;grid-template-columns:1fr;align-items:center;justify-items:center;}</style>';

}

return $course_details;

},10,2);

results:

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *