Show add to cart button on take this course page

Please add this code in your wplms-customizer.php file present in the wplms customizer plugin:

add_filter('wplms_take_course_button_html','show_add_to_cart_button_on_take_this_course',99,2);
function show_add_to_cart_button_on_take_this_course($html,$course_id){
  $product_id = get_post_meta($course_id,'vibe_product',true);
  $html .= do_shortcode('[add_to_cart id="'.$product_id.'" sku=""]');
  return $html;
}

Now add the bellow css in your appearance->customize->custom css:

.single-course .product.woocommerce.add_to_cart_inline {border: none !important;padding:0 !important;}

.single-course .product.woocommerce.add_to_cart_inline del,.single-course .product.woocommerce.add_to_cart_inline ins,.single-course .product.woocommerce.add_to_cart_inline span {display:none;}

 

Leave a Reply

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