0

Can we have lesson selection in order items model box of learnpress plugin !!! In order box its showing courses items i need to have lessons selection too. Help !

Tried changing function of course getting from db (file name class-lp-admin-ajax.php) which shows like below

        public static function search_course_category() {
            global $wpdb;
            $sql   = 'SELECT `t`.`term_id` as `id`, '
                    . ' `t`.`name` `text` '
                    . " FROM {$wpdb->terms} t "
                    . "     INNER JOIN {$wpdb->term_taxonomy} tt ON t.term_id = tt.term_id AND taxonomy='course_category' "
                    . ' WHERE `t`.`name` LIKE %s';
            $s     = '%' . filter_input( INPUT_GET, 'q' ) . '%';
            $query = $wpdb->prepare( $sql, $s );
            $items = $wpdb->get_results( $query );
            $data  = array( 'items' => $items );
            echo json_encode( $data );
            exit();
        }

0 Answers0