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.

Was this article helpful?



    Do we still need to use this code or is it already a part of the theme now?

  2. SAM

    Hi, how do we include the name of the woocommerce product as well?

  3. SAM

    Hi, how do we include the name of the woocommerce product as well?

  4. erickpaulino


    I tried adding the codes to functions.php but the associated products field did not show up. So I bought and installed the WPLSM Woocommerce plugin but again the field didn’t show up. I want to set two products — one is a simple subscription, and the other is a simple virtual product. Can you please help?

Leave A Comment?