Show multiple pricing for Course via WooCommerce

Multiple Course Pricing, you’ll be able to connect multiple products to a course and display course pricing in following format:


function wplms_course_product_metabox($metabox_settings){
    $metabox_settings['vibe_more_products'] = array(
        'label' => __('Associated Products','vibe-customtypes'), // <label>
        'desc'  => __('Associated Products with the Course.','vibe-customtypes'), // description
        'id'    => 'vibe_more_products', // field id and name
        'type'  => 'selectmulticpt', // type of field
        'post_type'=> 'product',
    return $metabox_settings;

function wplms_show_more_products($credits,$course_id){
    $more_products = get_post_meta($course_id,'vibe_more_products',true);
    if(!empty($more_products) && is_Array($more_products)){
        foreach($more_products as $product_id){
            if(isset($product_id) && $product_id !='' && function_exists('get_product')){ //WooCommerce installed
                $product = get_product( $product_id );
                    $link =get_permalink($product_id);
                    if(isset($check) && $check)
                    $price_html = str_replace('class="amount"','class="amount" itemprop="price"',$product->get_price_html());
                    $credits[$link] = '<strong itemprop="offers" itemscope itemtype="">'.$price_html.'</strong>';
    return $credits;


a. Edit the course in WP Admin.

b. Locate course product settings.

c. Connect more products.

d. Update the course.

This is very useful if you’re using Paid Memberships Pro and WooCommerce.

You can keep 1 checkout by installing the PMPRO – WooCommerce Add-on Plugin :

and connecting the WooCommerce product for the membership with the course.

Leave a Reply

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