WooCommerce

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30364
    Steve Shiflett
    Participant

    I have a question about WooCommerce.
    _____
    My programmer says the theme I am using ‘Invent’ has a custom post type called course. WooComerce’s LMS systems have to use the same custom post type called course. This is causing a conflict between the LMS and the theme.

    He doesn’t think this theme is compatible with any WooComerce’s. The reason he is using WooComerce’s LMS is it can connect directly with authorize.net.
    ______
    Is this true? and can it be fixed. The programmers solution is to use another theme but my client wants to be able to use LearnDash. Please let me know as soon as possible why there is a conflict with your theme and the LMS. Steve

    #30377
    Raghavendra
    Moderator

    Hi, we were not aware of this. You can fix the same easily by having this in your child theme functions.php file –

    
    if (!function_exists('mo_register_course_post_type')) {
        function mo_register_course_post_type() {
            $labels = array(
                'name' => 'My Courses',
                'singular_name' => 'My Course',
                'add_new' => 'Add New',
                'add_new_item' => 'Add New Course',
                'edit_item' => 'Edit Course',
                'new_item' => 'New Course',
                'view_item' => 'View Course',
                'search_items' => 'Search Courses',
                'not_found' => 'No Courses found',
                'not_found_in_trash' => 'No Courses in the trash',
                'parent_item_colon' => '',
            );
    
            register_post_type('my_course', array(
                'labels' => $labels,
                'public' => true,
                'publicly_queryable' => true,
                'show_ui' => true,
                'exclude_from_search' => true,
                'query_var' => true,
                'rewrite' => true,
                'capability_type' => 'post',
                'taxonomies' => array('course_category'),
                'has_archive' => false,
                'hierarchical' => false,
                'menu_position' => 10,
                'menu_icon' => MO_THEME_URL . '/images/admin/balloon-quotation.png',
                'supports' => array(
                    'title',
                    'editor',
                    'thumbnail',
                    'page-attributes'
                )
            ));
    
            register_taxonomy('my_course_category', 'my_course', array(
                'hierarchical' => true,
                'label' => __('Course Categories', 'mo_theme'),
                'singular_label' => __('Course Category', 'mo_theme'),
                'rewrite' => array( 'slug' => 'course-category' ),
                'query_var' => true,
                'show_ui' => true,
                'public' => true,
                'show_admin_column' => true
            ));
    
        }
    }

    This will change the course custom post type slug to another one ‘my_course’.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.