1.Override the template of the LearnPress plugin

To improve the speed as well as the quality of LearnPress ThimPress is going to have some necessary changes in coding from LP3 to LP4. Today, we will list out those changes to help our developers get updated to the new version. To override the template of the LearnPress plugin, you should add this code to the function.php file

add_filter( 'learn-press/override-templates', function(){ return true; } );

 

2.Change in LearnPress template

  • First is a table list of template files that have changed from LP3 to LP4.


Direction in LP3

LearnPress 3

Direction in LP4

LearnPress 4

templates/checkout

form-logged-in.php

templates/checkout

account-logged-in.php

templates/checkout

form-login.php

templates/checkout

account-login.php

templates/checkout/form-login.php

learn-press/after-checkout-form-login-fields

templates/checkout/account-login.php

learn-press/after-checkout-account-login-fields

templates/checkout

form-register.php

templates/checkout

account-register.php

templates/checkout

form.php

templates/checkout

form.php

templates/checkout

payment.php

templates/checkout

payment.php

templates/checkout

review-order.php

templates/checkout

review-order.php

template/profile/tabs/courses

owned.php

template/profile/tabs/courses

created.php

template/profile/tabs/courses

purchased.php

template/profile/tabs/courses

enrolled.php

templates/profile/tabs/settings

publicity.php

templates/profile/tabs/settings

privacy.php

templates/profile/tabs/settings/publicity.php

learn-press/before-profile-publicity-fields

templates/profile/tabs/settings/privacy.php

learn-press/before-profile-privacy-fields

templates/profile/tabs/settings

learn-press/begin-profile-publicity-fields

templates/profile/tabs/settings/privacy.php

learn-press/begin-profile-privacy-fields

templates/profile/tabs/settings

learn-press/after-profile-publicity-fields

templates/profile/tabs/settings/privacy.php

learn-press/after-profile-privacy-fields

templates/single-course/buttons

retake.php

templates/single-course/buttons

retry.php

templates/single-course/buttons/retake.php

learn-press/before-retake-form

templates/single-course/buttons/retry.php

lp/tmpl/course/button-retry/form/before

templates/single-course/buttons/retake.php

learn-press/before-retake-button

templates/single-course/buttons/retry.php

lp/tmpl/course/button-retry/before

templates/single-course/buttons/retake.php

learn-press/after-retake-button

templates/single-course/buttons/retry.php

lp/tmpl/course/button-retry/after

templates/single-course/buttons/retake.php

learn-press/after-retake-form

templates/single-course/buttons/retry.php

lp/tmpl/course/button-retry/form/after

templates/widgets/course-info

default.php

templates/widgets

course-info.php

templates/widgets/course-progress

default.php

templates/widgets

course-progress.php

templates/widgets/featured-courses

default.php

templates/widgets

featured-courses.php

templates/widgets/recent-courses

default.php

templates/widgets

recent-courses.php

templates

content-archive-course.php

templates

archive-course.php
  • Next is a table list of templates that have added to LP4, these templates have never appeared in LP3.


Direction

LearnPreess 4

templates/checkout/account-register.php

learn-press/before-form-register-fields

templates/checkout/account-register.php

learn-press/after-form-register-fields

templates/checkout

guest-checkout-link.php

templates/checkout

guest-checkout.php

templates/checkout/payment.php

learn-press/after-payment-form

templates/checkout/payment.php

learn-press/checkout-proceed-button-text

templates/checkout/review-order.php

learn-press/review-order/cart-item-product

templates/content-quiz

js.php

templates/global/

clearfix.php

templates/global/become-teacher-form-fields.php

learnpress/become-a-teacher/before-form

templates/global/become-teacher-form-fields.php

learnpress/become-a-teacher/after-form

templates/loop/course/loop-begin.php

learn_press_course_loop_begin

templates/loop/course/loop-end.php

learn_press_course_loop_end

templates/loop/course

meta.php

templates/loop/course

info-begin.php

templates/loop/course

info-end.php

templates/loop/course

badge-featured.php

templates/loop/course

categories.php

template/pages

Exist

template/pages/checkout.php

learn-press/before-main-content

template/pages/checkout.php

learnpress/template/pages/checkout/before-content

template/pages/checkout.php

learn-press/before-checkout-page

template/pages/checkout.php

learn-press/after-checkout-page

template/pages/checkout.php

learn-press/after-main-content

template/pages/checkout.php

learnpress/template/pages/checkout/after-content

template/pages/profile.php

learnpress/template/pages/profile/before-content

template/pages/profile.php

learn-press/before-user-profile

template/pages/profile.php

learn-press/user-profile

template/pages/profile.php

learnpress/template/pages/profile/after-content

template/profile/dashboard

Exist

template/profile/dashboard

featured-courses.php

template/profile/dashboard

general-statistic.php

template/profile/dashboard/general-statistic.php

learn-press/before-profile-dashboard-general-statistic-row

template/profile/dashboard/general-statistic.php

learn-press/before-profile-dashboard-user-general-statistic

template/profile/dashboard/general-statistic.php

learn-press/after-profile-dashboard-user-general-statistic

template/profile/dashboard/general-statistic.php

learn-press/profile-dashboard-general-statistic-row

template/profile/dashboard/general-statistic.php

learn-press/before-profile-dashboard-instructor-general-statistic

template/profile/dashboard/general-statistic.php

learn-press/after-profile-dashboard-instructor-general-statistic

template/profile/dashboard/general-statistic.php

learn-press/after-profile-dashboard-general-statistic-row

template/profile/dashboard

latest-courses.php

template/profile/avatar.php

Exist

template/profile/header.php

Exist

template/profile/sidebar.php

Exist

learn-press/user-profile-account

Exist

learn-press/user-profile-tabs

Exist

template/profile/socials.php

Exist

template/profile/tabs.php

Exist

templates/single-course/content-item/popup-content.php

Exist

templates/single-course/content-item/popup-footer.php

Exist

templates/single-course/content-item/popup-header.php

Exist

templates/single-course/content-item/popup-sidebar.php

Exist

templates/single-course/meta

Exist

templates/single-course/meta/category.php

Exist

templates/single-course/meta/count.php

Exist

templates/single-course/meta/duration.php

Exist

templates/single-course/meta/instructor.php

Exist

templates/single-course/meta/level.php

Exist

templates/single-course/sidebar

Exist

templates/single-course/sidebar/course-extra.php

Exist

templates/single-course/sidebar/preview.php

Exist

templates/single-course/sidebar/user-progress.php

learn-press/user-item-progress

templates/single-course/sidebar/user-time.php

Exist

templates

single-course.php
  • Last is templates that are in LP3 but we removed them in LP4.


Direction

LearnPress 3

templates/checkout/form-login.php

learn_press_checkout_before_user_login_form

templates/checkout/form-login.php

learn-press/before-checkout-form-login-fields

templates/checkout/form-login.php

learn_press_checkout_user_login_before_form_fields

templates/checkout/form-login.php

learn-press/begin-checkout-form-login-fields

templates/checkout/form-login.php

learn-press/end-checkout-form-login-fields

templates/checkout/form-login.php

learn_press_checkout_user_login_after_form_fields

templates/checkout/form-login.php

learn-press/before-checkout-form-login-button

templates/checkout/form-login.php

learn_press_checkout_after_user_login_form

templates/checkout/form-register.php

learn_press_checkout_before_user_register_form

templates/checkout/form-register.php

learn-press/before-checkout-form-register

templates/checkout/form-register.php

learn_press_checkout_after_user_register_form

templates/checkout/form.php

learn-press/before-checkout-order-review

templates/checkout/form.php

learn_press_checkout_order_review

templates/checkout/form.php

learn-press/checkout-order-review

templates/checkout/form.php

learn-press/after-checkout-order-review

templates/checkout

guest-email.php

templates/checkout

index.php

templates/checkout/payment.php

learn_press_order_button_text

templates/checkout/payment.php

learn_press_order_button_text_processing

templates/checkout/payment.php

learn_press_before_payments

templates/checkout/payment.php

learn-press/begin-payment-methods

templates/checkout/payment.php

learn-press/end-payment-methods

templates/checkout/payment.php

learn_press_after_payments

templates/checkout/payment.php

learn-press/after-payment-methods

templates/checkout/payment.php

learn_press_order_before_submit

templates/checkout/payment.php

learn_press_order_button_html

templates/checkout/payment.php

learn_press_order_after_submit

templates/checkout/payment.php

learn_press_no_available_payment_methods_message

templates/checkout/review-order.php

learn-press/review-order/before-heading-row

templates/checkout/review-order.php

learn-press/review-order/after-heading-row

templates/content-lesson/video

Exist

templates/content-lesson

block-content.php

templates/content-lesson

no-content.php

templates/content-lesson

index.php

templates/content-question

Exist

templates/content-quiz/buttons

Exist

templates/content-quiz

buttons.php

templates/content-quiz

countdown-simple.php

templates/content-quiz

countdown.php

templates/content-quiz

description.php

templates/content-quiz

history.php

templates/content-quiz

index.php

templates/content-quiz

intro.php

templates/content-quiz

preview-mode.php

templates/content-quiz

progress.php

templates/content-quiz

question-numbers.php

templates/content-quiz

result.php

templates/content-quiz

review-title.php

templates/global

blank-comments.php

templates/global

comments.php

templates/global

course-meta-end.php

templates/global

course-meta-start.php

templates/global

index.php

templates/global

login.php

templates/global

notices.php

templates/global

restrict-access.php

templates/global

scripts.php

templates/loop

index.php

templates/loop/course

index.php

templates/loop/course

introduce.php

templates/loop/course

meta-begin.php

templates/loop/course

meta-end.php

templates/notices

Exist

template/order

index.php

template/profile/dashboard-logged-in.php

Exist

template/profile/get-back-order.php

Exist

template/profile/mobile-menu.php

Exist

template/profile/profile-cover.php

Exist

template/profile/profile.php

Exist

template/profile/profile.php

learn-press/before-user-profile

template/profile/profile.php

learn-press/user-profile

template/profile/profile.php

learn-press/after-user-profile

template/profile/user-bio.php

Exist

templates/profile/tabs/settings/basic-information.php

learn_press_before_

templates/profile/tabs/settings/basic-information.php

learn_press_after_

templates/profile/tabs/settings/change-password.php

learn_press_before_

templates/profile/tabs/settings/change-password.php

learn_press_after_

templates/single-course/content-item

footer.php

templates/single-course/content-item

header.php

templates/single-course/section/content-item.php

Exist

templates/single-course/section/content-item.php

learn-press/before-section-loop-item

templates/single-course/section/content-item.php

learn-press/after-section-loop-item

templates/single-course/section/content.php

Exist

templates/single-course/section/content.php

learn-press/begin-section-loop-item

templates/single-course/section/content.php

learn-press/end-section-loop-item

templates/single-course/section/index.php

Exist

templates/single-course/section/title.php

Exist

templates/single-course/tabs/curriculum.php

learn_press_before_single_course_curriculum

templates/single-course/tabs/curriculum.php

learn_press_after_single_course_curriculum

templates/single-course/tabs/instructor.php

learn-press/begin-course-instructor-description

templates/single-course/tabs/instructor.php

learn-press/end-course-instructor-description

templates/single-course/tabs/instructor.php

learn-press/after-course-instructor-description

templates/single-course/tabs/instructor.php

learn-press/after-course-instructor-socials

templates

search-form.php

3.Action

  • The first table list is the newly actions that have added to LearnPress 4.


Folder

File name

Action

inc/lp-template-hooks.php

course-progress.php

learn-press/course-meta-primary-left

inc/lp-template-hooks.php

course-progress.php

learn-press/course-meta-secondary-left

inc/lp-template-hooks.php

course-progress.php

learn-press/course-summary-sidebar

inc/lp-template-hooks.php

course-progress.php

learn-press/after-section-loop-item-title

inc/lp-template-hooks.php

course-progress.php

learn-press/popup-footer

inc/lp-template-hooks.php

course-progress.php

learn-press/user-profile-account

inc/lp-template-hooks.php

course-progress.php

learn-press/user-profile-tabs

inc/lp-template-hooks.php

course-progress.php

learn-press/profile/before-dashboard

inc/lp-template-hooks.php

course-progress.php

learn-press/ready

templates/single-course

content-item-lp_quiz.php

learn-press/after-content-item-summary/' . $quiz->get_item_type()

templates/single-course

content.php

learn-press/course-content-summary

templates/single-course

loop-section.php

learn-press/before-section-summary

templates/single-course

loop-section.php

learnpress/single-course/section-header/after

templates/single-course

loop-section.php

learn-press/before-section-content

templates/single-course

loop-section.php

learn-press/before-section-loop-item

templates/single-course

loop-section.php

learn-press/before-section-loop-item-title

templates/single-course

loop-section.php

learn-press/after-section-loop-item-title

templates/single-course

loop-section.php

learn-press/after-section-loop-item

templates/single-course

loop-section.php

learn-press/after-section-summary

content-archive-course.php

loop-section.php

learn-press/template-header

content-archive-course.php

loop-section.php

learn-press/sidebar

content-archive-course.php

loop-section.php

learn-press/template-footer

content-single-item.php

loop-section.php

learn-press/template-header

content-single-item.php

loop-section.php

learn-press/template-footer

courses-top-bar.php

single-course.php
  • The second table list is actions that are in LearnPress 3 but are removed in LearnPress 4.


Folder

File name

Action

templates/order

order-details.php

learn_press_order_items_table

templates/profile

tabs/settings/basic-information.php

learn_press_before_' . $section . '_edit_fields'

templates/profile

tabs/settings/basic-information.php

learn_press_after_' . $section . '_edit_fields'

templates/profile

tabs/settings/change-password.php

learn_press_before_' . $section . '_edit_fields'

templates/profile

tabs/settings/change-password.php

learn_press_after_' . $section . '_edit_fields'

templates/single-course

tags/curriculum.php

learn_press_before_single_course_curriculum

templates/single-course

tags/curriculum.php

learn_press_after_single_course_curriculum

templates/single-course

tags/instructor.php

learn-press/begin-course-instructor-description

templates/single-course

tags/instructor.php

learn-press/end-course-instructor-description

templates/single-course

tags/instructor.php

learn-press/after-course-instructor-description

templates/single-course

tags/instructor.php

learn-press/after-course-instructor-socials

templates/single-course

content.php

learn_press_course_content_summary

templates/single-course

loop-section.php

learn_press_curriculum_section_summary'

templates/single-course

loop-section.php

learn-press/section-summary'

content-archive-course.php

loop-section.php

learn_press_before_main_content

content-archive-course.php

loop-section.php

learn_press_archive_description

content-archive-course.php

loop-section.php

learn-press/archive-description

content-archive-course.php

loop-section.php

learn_press_before_courses_loop

content-archive-course.php

loop-section.php

learn_press_after_courses_loop

content-archive-course.php

loop-section.php

learn_press_after_main_content

content-course.php

loop-section.php

learn_press_courses_loop_item_title

content-course.php

loop-section.php

learn_press_before_courses_loop_item

content-course.php

loop-section.php

learn_press_after_courses_loop_item

content-single-course.php

loop-section.php

learn_press_before_main_content

content-single-course.php

loop-section.php

learn_press_before_single_course

content-single-course.php

loop-section.php

learn_press_before_single_course_summary

content-single-course.php

loop-section.php

learn-press/before-main-content

content-single-course.php

loop-section.php

learn-press/after-main-content

content-single-course.php

loop-section.php

learn_press_after_single_course_summary

content-single-course.php

loop-section.php

learn_press_after_single_course

content-single-course.php

loop-section.php

learn_press_after_main_content

search-form.php

4.Filter

  • This table list shows all the filters that have added to LP4.


Folder

File name

Filter

inc/admin

meta-box/class-lp-meta-box-helper.php

learnpress/meta-box/field-custom

inc/admin

meta-box/class-lp-meta-box-helper.php

learnpress_metabox_settings_sanitize_option

inc/admin

meta-box/class-lp-meta-box-helper.php

learnpress_metabox_settings_sanitize_option_$option_name

inc/admin

settings/email-groups/class-lp-settings-emails-group.php

learn-press/admin/get-settings/admin-options-'
. $this-group_id

inc/admin

settings/abstract-settings-page.php

learn-press/admin/get-settings/admin-options-'
. $section

inc/admin

settings/class-lp-settings-advanced.php

learn_press_advanced_settings

inc/admin

views/meta-boxes/order/order-item.php

learn_press/order_item_link

inc/admin

views/meta-boxes/order/order-item.php

learn_press/order_item_name

inc/admin

class-lp-admin-assets.php

learn-press/admin/script-data

inc/admin

class-lp-admin-assets.php

learnpress/admin/modal-dialog

inc/admin

class-lp-modal-search-items.php

learn_press_filter_admin_ajax_modal_search_items_args

inc/admin

class-lp-updater.php

lp/upgrade/db/map_version

inc/admin

lp-admin-actions.php

views_edit-' . $post_type . '',
'_learn_press_restrict_view_items'

inc/cart

lp-cart-functions.php

learn_press_checkout_cart

inc/course

abstract-course.php

learn-press/course-thumbnail-url

inc/course

abstract-course.php

learn-press/is-purchasable

inc/course

abstract-course.php

learn-press/course-passing-condition

inc/course

abstract-course.php

learn-press/course/custom-item-prefixes

inc/course

abstract-course.php

learn_press_count_user_completed_items

inc/course

class-lp-course-item.php

learn-press/course-item-status-title

inc/course

class-lp-course.php

learnpress/course/block_duration_expire/timestamp_remaining

inc/course

class-lp-course.php

learnpress/rest-api/enroll-course/redirect

inc/course

lp-course-functions.php

learn-press/translate-course-result-required

inc/custom-post-types

abstract.php

learn-press/custom-post-support-gutenberg

inc/custom-post-types

order.php

learn-press/order-status-icon

inc/emails

quiz.php

learn-press/enable-email-recipients

inc/gateways

class-lp-gateway-abstract.php

learn-press/admin/get-settings/admin-options-'
. $this-id

inc/question

class-lp-question-fill-in-blanks.php

learn-press/question-editor/localize-script

inc/question

class-lp-question-fill-in-blanks.php

learn-press/quiz-editor/question-answers-data

inc/question

class-lp-question-fill-in-blanks.php

learn-press/question-editor/question-answers-data

inc/question

class-lp-question-fill-in-blanks.php

learn-press/question/fib/regex-content

inc/question

class-lp-question.php

learn-press/question/fib/regex-content

inc/rest-api

class-lp-core-api.php

learn-press/core-api/controllers

inc/rest-api

class-lp-rest-courses-controller.php

learnpress/rest-api/courses/purchase/redirect

inc/rest-api

class-lp-rest-authentication.php

learn-press/is-rest-api-request

inc/user

abstract-lp-user.php

learn-press/complete-lesson-graduation

inc/user

abstract-lp-user.php

learn-press/user-profile-social-icon

inc/user

abstract-lp-user.php

learn-press/user-profile-socials

inc/user

class-lp-profile.php

learn-press/check-privacy-setting

inc/user

class-lp-profile.php

learn-press/profile/privacy-tabs

inc/user

class-lp-profile.php

learn-press/profile-privacy-settings'

inc/user

class-lp-user-factory.php

learnpress/course/can-view-content

inc/user

class-lp-user-factory.php

learnpress/course/item/can-view

inc/user

class-lp-user-factory.php

learn-press/user/course/can-retry

inc/user

lp-user-functions.php

learn-press/user-class

inc/user

lp-user-functions.php

learn-press/create-user-item-data

inc/user

lp-user-functions.php

learn-press/single-quiz-js/question-data

inc/user

lp-user-functions.php

learn-press/user-extra-profile-info

inc/user

lp-user-functions.php

learn-press/social-profiles

inc/user

lp-user-functions.php

learn-press/after-form-register-fields

inc/user

lp-user-functions.php

lp/user-custom-register-fields

inc/user

lp-user-functions.php

learn-press/social-profile-name

inc/user

lp-user-functions.php

learn-press/user-extra-profile-fields

inc/user-item

class-lp-user-item-course.php

learn-press/update-course-results

inc/user-item

class-lp-user-item-course.php

learn-press/finish-course-status

inc/user-item

class-lp-user-item-course.php

learn-press/course-item/passed

inc/user-item

class-lp-user-item-quiz.php

learn-press/user-quiz-graduation

inc/user-item

class-lp-user-item-quiz.php

learn-press/user-quiz-graduation-text

inc/user-item

class-lp-user-item-quiz.php

lp/quiz/get-attempts/limit

inc/user-item

class-lp-user-item-quiz.php

learn-press/user-item-quiz-questions

inc/user-item

class-lp-user-item-quiz.php

learn-press/get-negative-marking-value

inc/user-item

class-lp-user-item-quiz.php

learn-press/question-results-data

inc/user-item

class-lp-user-item-quiz.php

learn-press/can-instant-check-question

inc/user-item

class-lp-user-item-quiz.php

learn-press/user-quiz/can-hint-answer

inc/user-item

class-lp-user-item.php

learnpress/user-item/get-graduation

inc/user-item

class-lp-user-item.php

learn-press/update-user-item-data

inc/user-item

class-lp-user-item.php

learn-press/user-item-time-remaining

inc/abstract-settings.php

course-progress.php

learn_press_settings_field_name_'
. $name

inc/class-lp-checkout.php

course-progress.php

learn_press_create_order

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout/oder_item_name

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout-no-payment-result

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout-error

inc/class-lp-ajax.php

course-progress.php

learnpress/guest_checkout_email_exist_output

inc/class-lp-forms-handler.php

course-progress.php

learnpress_registration_error_email_exists

inc/class-lp-forms-handler.php

course-progress.php

learn-press/become-teacher-request-result

inc/class-lp-forms-handler.php

course-progress.php

learnpress_login_credentials

inc/class-lp-forms-handler.php

course-progress.php

learnpress_registration_generate_password

inc/class-lp-forms-handler.php

course-progress.php

learnpress_registration_errors

inc/class-lp-forms-handler.php

course-progress.php

learnpress_new_customer_data

inc/class-lp-forms-handler.php

course-progress.php

learn-press/update-profile-basic-information-data

inc/class-lp-page-controller.php

course-progress.php

learnpress/page/set-link-item-course-404

inc/class-lp-strings.php

course-progress.php

learn-press/messages

inc/class-lp-widget.php

course-progress.php

learnpress_widget_settings_sanitize_option

inc/class-lp-widget.php

course-progress.php

learnpress_cached_widget_id

inc/lp-core-functions.php

course-progress.php

learn-press/get-page-title

inc/lp-core-functions.php

course-progress.php

learn-press/get-page-' . $key

inc/lp-core-functions.php

course-progress.php

learn-press/questions-support-answer-options

inc/lp-core-functions.php

course-progress.php

learn-press/default-course-levels

inc/lp-core-functions.php

course-progress.php

learnpress/course-evaluation/methods

inc/lp-core-functions.php

course-progress.php

learn-press/max-retry-quiz-allowed

inc/lp-core-functions.php

course-progress.php

learn-press/max-retry-course-allowed

inc/lp-core-functions.php

course-progress.php

learn-press/user-item-failed-slug

inc/lp-core-functions.php

course-progress.php

learn-press/user-item-passed-slug

inc/lp-core-functions.php

course-progress.php

learn-press/user-item-in-progress-slug

inc/lp-core-functions.php

course-progress.php

learn-press/user-item-under-evaluation-slug

inc/lp-core-functions.php

course-progress.php

learn-press/course-enrolled-slugs

inc/lp-core-functions.php

course-progress.php

lp_item_course_class

inc/lp-deprecated.php

course-progress.php

learn_press_breadcrumb_defaults

inc/lp-deprecated.php

course-progress.php

learn_press_breadcrumb_home_url

inc/lp-deprecated.php

course-progress.php

learn_press_course_comments_open

inc/lp-deprecated.php

course-progress.php

learn_press_profile_tab_courses_own_limit

inc/lp-deprecated.php

course-progress.php

learn_press_profile_tab_courses_learning_limit

inc/lp-deprecated.php

course-progress.php

learn_press_profile_tab_courses_purchased_limit

inc/lp-deprecated.php

course-progress.php

learn_press_profile_tab_courses_finished_limit

inc/lp-deprecated.php

course-progress.php

learn_press_profile_tab_courses_all_limit

inc/lp-deprecated.php

course-progress.php

learn_press_become_teacher_form_fields

inc/lp-template-functions.php

course-progress.php

learn-press/document-course-title-parts

inc/lp-template-functions.php

course-progress.php

learn-press/document-profile-title-parts

inc/lp-template-functions.php

course-progress.php

learn_press_child_in_parrent_template_path

inc/lp-template-functions.php

course-progress.php

learn-press/override-templates

inc/lp-template-functions.php

course-progress.php

learn-press/courses-layouts

inc/lp-template-functions.php

course-progress.php

learn-press/page-title

inc/lp-template-functions.php

course-progress.php

learn-press/level-label

inc/lp-template-functions.php

course-progress.php

learn-press/profile-logout-slug

inc/lp-template-hooks.php

course-progress.php

learn-press/section-visible

templates/single-course

tags/curriculum.php

learnpress/course/curriculum/empty
  • The next table list is Folders that have skipped when upgraded to LP4


Folder

File name

Filter

inc/admin

meta-box/class-lp-meta-box-helper.php

learn-press/meta-box/field-name

inc/admin

meta-box/class-lp-meta-box-helper.php

learn-press/meta-box/field-id

inc/admin

settings/class-lp-settings-advanced.php

learn_press_profile_settings

inc/admin

settings/class-lp-settings-courses.php

learn-press/course-settings-fields/general

inc/admin

settings/class-lp-settings-courses.php

learn-press/course-settings-fields/archive

inc/admin

settings/class-lp-settings-courses.php

learn-press/course-settings-fields/thumbnails

inc/admin

settings/class-lp-settings-profile.php

learn-press/profile-settings-fields/avatar

inc/admin

settings/class-lp-settings-profile.php

learn-press/profile-settings-fields/publicity

inc/admin

settings/class-lp-settings-profile.php

learn_press_profile_settings

inc/admin

sub-menus/class-lp-submenu-addons.php

class-lp-submenu-addons.php

inc/admin

sub-menus/class-lp-submenu-settings.php

learn-press/admin/page-settings/emails/sections

inc/admin

sub-menus/class-lp-submenu-settings.php

learn-press/update-settings/exclude-vars

inc/admin

sub-menus/class-lp-submenu-settings.php

learn-press/update-settings/' .
sanitize_text_field( wp_unslash( $key ) )

inc/admin

sub-menus/class-lp-submenu-settings.php

learn-press/update-settings/settings-value

inc/admin

views/meta-boxes/order/details.php

learn-press/order-payment-method-title

inc/admin

views/meta-boxes/order/order-item.php

learn_press/order_detail_item_link

inc/admin

class-lp-admin.php

learn-press/required-pages

inc/admin

lp-admin-functions.php

learn_press_question_types

inc/course

lp-course-functions.php

learn-press/custom-thumbnail-sizes

inc/custom-post-types

course.php

rwmb__lpr_course_price_html

inc/custom-post-types

course.php

learn-press/admin-localize-course-editor

inc/custom-post-types

course.php

learn-press/admin-course-tabs

inc/custom-post-types

course.php

learn_press_course_settings_meta_box_args

inc/custom-post-types

course.php

learn_press_course_assessment_metabox

inc/custom-post-types

course.php

learn_press_course_payment_meta_box_args

inc/custom-post-types

course.php

learn-press/course-settings/payments

inc/custom-post-types

course.php

learn_press_course_author_role_meta_box

inc/custom-post-types

course.php

learn_press_course_author_meta_box

inc/custom-post-types

course.php

learn_press_course_video_meta_box_args

inc/custom-post-types

course.php

learn_press_review_log_message

inc/custom-post-types

question.php

learn-press/question-editor/i18n

inc/custom-post-types

question.php

learn-press/admin/external-js-component

inc/custom-post-types

question.php

learn_press_question_meta_box_args

inc/custom-post-types

quiz.php

learn-press/admin/external-js-component

inc/custom-post-types

quiz.php

learn_press_quiz_general_meta_box

inc/order

class-lp-order.php

learn-press/

inc/order

class-lp-order.php

learn_press_confirm_order_received_text

inc/question

class-lp-question-database.php

learnpress/query_get_total_question_unassigned

inc/quiz

lp-quiz-functions.php

learn_press_quiz_question_url

inc/shortcodes

class-lp-shortcode-button-course.php

learn-press/enroll-course-button-text

inc/shortcodes

class-lp-shortcode-button-course.php

learn-press/purchase-course-button-text

inc/shortcodes

class-lp-shortcode-button-course.php

learn-press/purchase-course-button-text

inc/shortcodes

class-lp-shortcode-button-course.php

learn-press/enroll-course-button-text

inc/user

abstract-lp-user.php

learn-press/insert-user-item-data

inc/user

abstract-lp-user.php

learn-press/update-user-item-data

inc/user

abstract-lp-user.php

learn-press/can-view-item

inc/user

abstract-lp-user.php

learn_press_user_can_retake_quiz

inc/user

abstract-lp-user.php

learn-press/can-view-quiz

inc/user

abstract-lp-user.php

learn_press_user_view_quiz

inc/user

abstract-lp-user.php

learn-press/can-view-lesson

inc/user

abstract-lp-user.php

learn_press_user_view_lesson

inc/user

abstract-lp-user.php

learn_press_finish_course_not_passed

inc/user

abstract-lp-user.php

learn_press_user_can_retake_course

inc/user

abstract-lp-user.php

learn-press/before-retake-course

inc/user

abstract-lp-user.php

learn-press/course-is-locked

inc/user

abstract-lp-user.php

learn_press_user_can_access_course

inc/user

class-lp-profile.php

learn-press/profile/class

inc/user

class-lp-profile.php

learn-press/check-publicity-setting

inc/user

class-lp-profile.php

learn-press/profile/publicity-tabs

inc/user

class-lp-profile.php

learn-press/get-publicity-setting

inc/user

class-lp-profile.php

learn-press/profile-pucture

inc/user

class-lp-user-factory.php

learn_press_user_class

inc/user

lp-user-functions.php

learn_press_display_name_publicly

inc/user-item

class-lp-user-item-quiz.php

learn-press/user-quiz/can-check-answer

inc/widgets

course-info.php

learn-press/widget/display-' .
$this-id_base

inc/widgets

course-progress.php

learn-press/widget/display-' .
$this-id_base

inc/class-lp-ajax.php

course-progress.php

learn-press/registration-error

inc/class-lp-ajax.php

course-progress.php

learn-press/registration-redirect

inc/class-lp-ajax.php

course-progress.php

learn-press/user-retake-course-redirect

inc/class-lp-ajax.php

course-progress.php

learn-press/user-retaken-course-result

inc/class-lp-ajax.php

course-progress.php

learn-press/user-retake-course-failed-result

inc/class-lp-checkout.php

course-progress.php

learn_press_checkout_validate_field

inc/class-lp-checkout.php

course-progress.php

learn_press_create_order

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout/oder_item_name

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout-no-payment-result

inc/class-lp-checkout.php

course-progress.php

learn-press/checkout-error

inc/class-lp-forms-handler.php

course-progress.php

learn-press/become-teacher-validate-field

inc/class-lp-forms-handler.php

course-progress.php

learn-press/login-validate-field

inc/class-lp-forms-handler.php

course-progress.php

learn-press/login-request-result

inc/class-lp-forms-handler.php

course-progress.php

learn-press/register-validate-field

inc/class-lp-forms-handler.php

course-progress.php

learn-press/new-user-data

inc/class-lp-forms-handler.php

course-progress.php

learn-press/register-request-result

inc/class-lp-request-handler.php

course-progress.php

learn-press/add-to-cart-redirect

inc/class-lp-request-handler.php

course-progress.php

learn-press/checkout-no-payment-result

inc/class-lp-request-handler.php

course-progress.php

learn-press/purchase-course-id

inc/class-lp-request-handler.php

course-progress.php

learn-press/enroll-course-redirect-login

inc/class-lp-request-handler.php

course-progress.php

learn-press/purchase-course-id

inc/class-lp-request-handler.php

course-progress.php

learn-press/get-course-order

inc/class-lp-request-handler.php

course-progress.php

learn-press/add-to-cart-redirect

inc/class-lp-request-handler.php

course-progress.php

learn-press/enroll-course-redirect-login

inc/class-lp-request-handler.php

course-progress.php

learn-press/enroll-course-redirect

inc/class-lp-strings.php

course-progress.php

learnpress/strings

inc/class-lp-widget.php

course-progress.php

learn-press/widget/option_prefix

inc/class-lp-widget.php

course-progress.php

learn-press/widget/display

inc/class-lp-widget.php

course-progress.php

learn-press/widget/display-' .
$this-id_base

inc/lp-core-functions.php

course-progress.php

learn_press_become_teacher_form_fields

inc/lp-core-functions.php

course-progress.php

learn_press_filter_become_a_teacher_notify_message

inc/lp-template-functions.php

course-progress.php

learn-press/maximum-students-reach

inc/lp-template-functions.php

course-progress.php

learn-press/order-processing-message

inc/lp-template-functions.php

course-progress.php

learn-press/tmpl-button-purchase-course

inc/lp-template-functions.php

course-progress.php

learn_press_breadcrumb_defaults

inc/lp-template-functions.php

course-progress.php

learn_press_breadcrumb_home_url

inc/lp-template-functions.php

course-progress.php

learn_press_profile_tab_courses_all_limit

inc/lp-template-functions.php

course-progress.php

learn_press_profile_tab_courses_learning_limit

inc/lp-template-functions.php

course-progress.php

learn_press_profile_tab_courses_purchased_limit

inc/lp-template-functions.php

course-progress.php

learn_press_profile_tab_courses_finished_limit

inc/lp-template-functions.php

course-progress.php

learn_press_profile_tab_courses_own_limit

inc/lp-template-functions.php

course-progress.php

learn_press_quiz_access_denied_redirect_permalink

inc/lp-template-functions.php

course-progress.php

learn_press_lesson_access_denied_redirect_permalink

inc/lp-template-functions.php

course-progress.php

learn-press/color-schemas

inc/lp-template-functions.php

course-progress.php

learn-press/course-item-link

templates/single-course

tags/curriculum.php

learn_press_course_curriculum_empty

templates/single-course

tags/tabs.php

learn_press_allow_display_tab_section

5.Rest API

6.Get Token


URL

METHOD

PARAMS

Parameter

Type

Desscription

/wp-json/learnpress/v1/token

POST

username

string

The username of the user.

password

string

The password of the user.

Response

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2RlZmF1bHQyIiwiaWF0IjoxNjE4MjgzOTIwLCJuYmYiOjE2MTgyODM5MjAsImV4cCI6MTYxODg4ODcyMCwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMiJ9fX0.X23nlkFJBg8SZnqMqfBelOBkPXsAMlyn5uwXHfaMpUM",
  "user_id": "2",
  "user_login": "instructor",
  "user_email": "[email protected]",
  "user_display_name": "instructor"
}

 

7.Validate token


URL

METHOD

/wp-json/learnpress/v1/token/validate

POST

Response

{
  "code": "lp_jwt_auth_valid_token",
  "message": "Valid access token.",
  "data": {
    "status": 200,
    "exp": 167014
  }
}

 

8.List all course


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/courses

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

category

string

Limit result set to courses assigned a specific category ID. Example: category=[1,2]

tag

string

Limit result set to courses assigned a specific tag ID.

Response

{
  "id": 10,
  "name": "Course 1",
  "slug": "course-1",
  "permalink": "http://learnpress4.local/courses/course-1/",
  "image": "http://learnpress4.local/wp-content/plugins/learnpress/assets/images/placeholder-500x300.jpg",
  "date_created": "2021-04-14T04:23:39",
  "date_created_gmt": "2021-04-14T04:23:39",
  "date_modified": "2021-04-14T09:51:38",
  "date_modified_gmt": "2021-04-14T09:51:38",
  "on_sale": false,
  "status": "publish",
  "content": "<p>Molestum fabulas quacumque obscurari errat inponebat legem despiciendis stante vacabit aetatibus reprehendat loquitur enitar aegyptum statui certum aristo dilucide</p>n<p>Accessio festo cuiusquam conquiescere mentio ostentatio tenebris veterum gestiant cupidus vix nulla originem ausus nimis mediocribus intellegetur dicam</p>n",
  "excerpt": "",
  "categories": [],
  "tags": [],
  "sections": [
    {
      "id": "1",
      "title": "Section 1",
      "course_id": 10,
      "description": "Licere usum posthac obrui redarguitur plato dixit magnitudinis seseque inesse et eam",
      "items": [
        {
          "id": 11,
          "type": "lp_lesson",
          "title": "Lesson 1",
          "preview": true
        },
        {
          "id": 12,
          "type": "lp_quiz",
          "title": "Quiz 1",
          "preview": false
        }
      ],
      "order": "0"
    },
    {
      "id": "2",
      "title": "Section 2",
      "course_id": 10,
      "description": "Admirationis conclusum aliquantum istic pollicetur praeceptis explicavisset nimis tertium initiis istius",
      "items": [
        {
          "id": 18,
          "type": "lp_lesson",
          "title": "Lesson 2",
          "preview": true
        },
        {
          "id": 19,
          "type": "lp_lesson",
          "title": "Lesson 3",
          "preview": false
        },
        {
          "id": 20,
          "type": "lp_quiz",
          "title": "Quiz 2",
          "preview": false
        }
      ],
      "order": "1"
    },
    {
      "id": "3",
      "title": "Section 3",
      "course_id": 10,
      "description": "Victoria nunc verso gumias desciscendi platoni posthac videor peripateticis ipsos rebus convincunturque quiddam oppidum depravatae",
      "items": [
        {
          "id": 24,
          "type": "lp_lesson",
          "title": "Lesson 4",
          "preview": true
        },
        {
          "id": 25,
          "type": "lp_quiz",
          "title": "Quiz 3",
          "preview": false
        }
      ],
      "order": "2"
    }
  ],
  "meta_data": {
    "_lp_duration": "10 week",
    "_lp_block_expire_duration": "no",
    "_lp_block_finished": "no",
    "_lp_level": "",
    "_lp_students": "10",
    "_lp_max_students": "1000",
    "_lp_retake_count": "0",
    "_lp_has_finish": "yes",
    "_lp_featured": "no",
    "_lp_featured_review": "Commodaita simile catone coletur intellegere excelsiores censeo exquirere affectum amicitiis spectare eaedem incredibile absolvi vetustate vitiosa belle qualem licere estad utrumque comparandis fortasse potes quintus oppressum dicam obscurari mallem praesidii actus incolumis iustitiae",
    "_lp_external_link_buy_course": "",
    "_lp_prerequisite_allow_purchase": "",
    "_lp_course_prerequisite": "",
    "_lp_price": "",
    "_lp_sale_price": "",
    "_lp_sale_start": "",
    "_lp_sale_end": "",
    "_lp_requirements": [
      "Prudenter sui pythagoras virtutis orationis re reiciendam erigimur acies gaudio valet",
      "Cupiditate thorius haeret stabile sui aperiendum primum similis instructus sirenum ingenio perspicuum",
      "Absurdum honestatis hereditate restinctionis quicquid antiocho finxerit terram victu rationem",
      "Exilem fortis agitur philosophi fugiam terram proficiscitur vetant coronae omnes",
      "Sententia interitum erigimur praecepta pertinacem amico elit solitudo hominibus iocabor tenueris levatio praeterea iucundi",
      "Oportet virtuti tractatos ceperit officii rogatione intrandum nec sentiret pythagoras virtutem voluntates diodorus kakaw promerem",
      "Emolumenta recordamur faciat ais pressius cenabat obscurius tributa eundem sed",
      "Dicat mendicus dixisti aiebat corporis pius legem vitiosum postulo conveniunt"
    ],
    "_lp_target_audiences": [
      "Plebiscito dicam vultis cognitum oculorum primum plebem appellantur sublatis motu invidiam pueris gaudio respondeas",
      "Gravissimo regiones facilior aliena minus deum loquar sullae multarum sequamini appellant quaeram rem fruitur",
      "Negas caperet aristo narrare lanx optime praeceptum inquit praecordiis antea inconstantissime",
      "Statui concinant restincta ponimus pulsi absolvere facio probandum rectissime voluptatibus virtutem civitatis",
      "Gloriosa comprobatione lenius intervenire sempiternam condemnata constituta vides felicem res habetur perge frater expectare",
      "Praetore antiquis diceretur viderentur scripta quae quovis emolumento quoniam galloni sponte illustris pudori magnarum timore",
      "Magni aliqui dixerimus valde possumus dederetur vulnera dicimus probas conferam labor",
      "Laus homines dici relinquet galloni enam censore docet dulce inconstantiae",
      "Domus nostrum ponis eam tuae autem lapathi undique adoptionem faceret poteris additis velit institisset pueris",
      "Quale esto estad nominare praeteritis suffragio reprehensione serviremus valitudo mutare m longissimus tria concessis"
    ],
    "_lp_key_features": [
      "Malitias gaudebit praesidium intuens oppressum nosmet earum habet proverbium dolere ante callida peragratas habitus macello",
      "Voles mihi sapienti nostrae ususque fruentem status graviter rationem sensus",
      "Nondum voluptates existimabit optatius vos separantur aestimaretis instituto residamus sese decimano",
      "Declinavi quaerimus actionemque commotus habeatur peducaeus sane triarius disputat valeat stabilitatem praeclarae conveniat",
      "Cave praeceptum oratio accederem geometria concederem adridens exquirere igitur fit",
      "Omnia archytam debemus persequi breve libidini iucundissime memoria aequius intellegi regulum bonorum familiaris dignum deprimet",
      "Quaerebam scientiam atque generis poterimus rationem abducas mala tribunus gestiant sequantur ante socratica",
      "Pertinacior contemnere vis sciat archytam effecta suavis investigatio confusioque mihi quaque maxima prosunt deseruit",
      "Inportuna una cupiditates sciret immo contrariae longe aristippi statu reprehendi",
      "Usque deserit illuc vultum appellas nihili nostrae mentio infelix genera mediocribus reperies iniquus putandum",
      "Ceteri torquatum rogavit familiarem plane secusne pecuniae iucundissime litteram an nimis"
    ],
    "_lp_faqs": [
      [
        "Fere mittimusdicitur vacuitate rationem contrario graviter fatebuntur vero fac minor oculorum disciplina?",
        "<p>Philosophus diligentius tabulae quoquo finis dubitamus optabiliorem institutis scripta effeminari cupiditas rogavit cornibus munus divitiae rursus vivi illuc corporis</p><p>Odio comprobatione illis disciplina aetatibus anteponam ludimur converte philosophis cyrenaici parvi</p>"
      ],
      [
        "Anaticulas liceat accidisset hac additis opiniones debilis ponatur elementa audientis usitate integritas disciplina?",
        "<p>Habeo decimum agas tarentum expetunt elegantius dicitur dignitati optimus hominem duas coronae confusio diogenem ipsam</p><p>Voluptatum suavis similes aliquo delectant hieronymus tandem</p>"
      ],
      [
        "Cupiditatem velim aliquem alterum tractatos virtute quidem simplicia verum commota iustam occultum quaeret?",
        "<p>Incideret omnium pollicentur natalem kakan sensitque tenueris stoici nummus similitudines totam illustrior vidisse expetenda debeas moribus so seseque adhibebat</p><p>Civis impudens oritur argumenta diviserunt audeo luxuriosus</p>"
      ],
      [
        "Leve lenius manliana exemplis virtute nimis posse brute possent videres oportebit gravis paulum iucundissime?",
        "<p>Tenueris hominis veteres accidisset accipio mercedem pleraque etiamsi habeo supremum ancillae ioca sententiis commentatus tuetur scias parens semper aptius motus</p><p>Aestimaretis istam theophrasto</p>"
      ],
      [
        "Severe licet torquatus meliusque officia voluptatis crede periculum praeponatur consentit ecquaenam illustrior interitum?",
        "<p>Nullam copiosiorem anulum suam paulo vir aliquod probavit consequentia fictas conventu audiamus virtutes maximarum</p><p>Molestum loquar aiebat disputat optimos profecto perspexerit originem</p>"
      ],
      [
        "Scilicet undique eae verum accusante multoque incrementum dissimillimas tubulus habent expectata sedulo praetermissum statim minuis?",
        "<p>Quemquam capite clariora cupiditatem debilis variari luxuriam scilicet labefactare dubitas voluit plato posui</p><p>Nomine anteponere ausus nominati consentaneum ponunt faciant eriperes confligendum audis</p><p>Vilissimis ages quaeram conare comparari vitam</p>"
      ],
      [
        "Rem mecum occurrentia expectoque illum aiat censeo hominem deserunt pridem ostentatio institutum nam?",
        "<p>Octavio beate commendas minus habeat superabat inflammat torquatus regem reiecta eculeo legimus vivendum nulla</p><p>Oculorum probas themistocles audissem meminerimus intervenire</p>"
      ]
    ],
    "_lp_course_result": "evaluate_lesson",
    "_lp_passing_condition": "80",
    "_lp_course_author": "1"
  }
}

 

9.Retrieve a course


URL

Method

/wp-json/learnpress/v1/courses/id_course

GET

Response

{
  "id": 10,
  "name": "Course 1",
  "slug": "course-1",
  "permalink": "http://learnpress4.local/courses/course-1/",
  "image": "http://learnpress4.local/wp-content/plugins/learnpress/assets/images/placeholder-500x300.jpg",
  "date_created": "2021-04-14T04:23:39",
  "date_created_gmt": "2021-04-14T04:23:39",
  "date_modified": "2021-04-14T09:51:38",
  "date_modified_gmt": "2021-04-14T09:51:38",
  "on_sale": false,
  "status": "publish",
  "content": "<p>Molestum fabulas quacumque obscurari errat inponebat legem despiciendis stante vacabit aetatibus reprehendat loquitur enitar aegyptum statui certum aristo dilucide</p>n<p>Accessio festo cuiusquam conquiescere mentio ostentatio tenebris veterum gestiant cupidus vix nulla originem ausus nimis mediocribus intellegetur dicam</p>n",
  "excerpt": "",
  "categories": [],
  "tags": [],
  "sections": [
    {
      "id": "1",
      "title": "Section 1",
      "course_id": 10,
      "description": "Licere usum posthac obrui redarguitur plato dixit magnitudinis seseque inesse et eam",
      "items": [
        {
          "id": 11,
          "type": "lp_lesson",
          "title": "Lesson 1",
          "preview": true
        },
        {
          "id": 12,
          "type": "lp_quiz",
          "title": "Quiz 1",
          "preview": false
        }
      ],
      "order": "0"
    },
    {
      "id": "2",
      "title": "Section 2",
      "course_id": 10,
      "description": "Admirationis conclusum aliquantum istic pollicetur praeceptis explicavisset nimis tertium initiis istius",
      "items": [
        {
          "id": 18,
          "type": "lp_lesson",
          "title": "Lesson 2",
          "preview": true
        },
        {
          "id": 19,
          "type": "lp_lesson",
          "title": "Lesson 3",
          "preview": false
        },
        {
          "id": 20,
          "type": "lp_quiz",
          "title": "Quiz 2",
          "preview": false
        }
      ],
      "order": "1"
    },
    {
      "id": "3",
      "title": "Section 3",
      "course_id": 10,
      "description": "Victoria nunc verso gumias desciscendi platoni posthac videor peripateticis ipsos rebus convincunturque quiddam oppidum depravatae",
      "items": [
        {
          "id": 24,
          "type": "lp_lesson",
          "title": "Lesson 4",
          "preview": true
        },
        {
          "id": 25,
          "type": "lp_quiz",
          "title": "Quiz 3",
          "preview": false
        }
      ],
      "order": "2"
    }
  ],
  "meta_data": {
    "_lp_duration": "10 week",
    "_lp_block_expire_duration": "no",
    "_lp_block_finished": "no",
    "_lp_level": "",
    "_lp_students": "10",
    "_lp_max_students": "1000",
    "_lp_retake_count": "0",
    "_lp_has_finish": "yes",
    "_lp_featured": "no",
    "_lp_featured_review": "Commodaita simile catone coletur intellegere excelsiores censeo exquirere affectum amicitiis spectare eaedem incredibile absolvi vetustate vitiosa belle qualem licere estad utrumque comparandis fortasse potes quintus oppressum dicam obscurari mallem praesidii actus incolumis iustitiae",
    "_lp_external_link_buy_course": "",
    "_lp_prerequisite_allow_purchase": "",
    "_lp_course_prerequisite": "",
    "_lp_price": "",
    "_lp_sale_price": "",
    "_lp_sale_start": "",
    "_lp_sale_end": "",
    "_lp_requirements": [
      "Prudenter sui pythagoras virtutis orationis re reiciendam erigimur acies gaudio valet",
      "Cupiditate thorius haeret stabile sui aperiendum primum similis instructus sirenum ingenio perspicuum",
      "Absurdum honestatis hereditate restinctionis quicquid antiocho finxerit terram victu rationem",
      "Exilem fortis agitur philosophi fugiam terram proficiscitur vetant coronae omnes",
      "Sententia interitum erigimur praecepta pertinacem amico elit solitudo hominibus iocabor tenueris levatio praeterea iucundi",
      "Oportet virtuti tractatos ceperit officii rogatione intrandum nec sentiret pythagoras virtutem voluntates diodorus kakaw promerem",
      "Emolumenta recordamur faciat ais pressius cenabat obscurius tributa eundem sed",
      "Dicat mendicus dixisti aiebat corporis pius legem vitiosum postulo conveniunt"
    ],
    "_lp_target_audiences": [
      "Plebiscito dicam vultis cognitum oculorum primum plebem appellantur sublatis motu invidiam pueris gaudio respondeas",
      "Gravissimo regiones facilior aliena minus deum loquar sullae multarum sequamini appellant quaeram rem fruitur",
      "Negas caperet aristo narrare lanx optime praeceptum inquit praecordiis antea inconstantissime",
      "Statui concinant restincta ponimus pulsi absolvere facio probandum rectissime voluptatibus virtutem civitatis",
      "Gloriosa comprobatione lenius intervenire sempiternam condemnata constituta vides felicem res habetur perge frater expectare",
      "Praetore antiquis diceretur viderentur scripta quae quovis emolumento quoniam galloni sponte illustris pudori magnarum timore",
      "Magni aliqui dixerimus valde possumus dederetur vulnera dicimus probas conferam labor",
      "Laus homines dici relinquet galloni enam censore docet dulce inconstantiae",
      "Domus nostrum ponis eam tuae autem lapathi undique adoptionem faceret poteris additis velit institisset pueris",
      "Quale esto estad nominare praeteritis suffragio reprehensione serviremus valitudo mutare m longissimus tria concessis"
    ],
    "_lp_key_features": [
      "Malitias gaudebit praesidium intuens oppressum nosmet earum habet proverbium dolere ante callida peragratas habitus macello",
      "Voles mihi sapienti nostrae ususque fruentem status graviter rationem sensus",
      "Nondum voluptates existimabit optatius vos separantur aestimaretis instituto residamus sese decimano",
      "Declinavi quaerimus actionemque commotus habeatur peducaeus sane triarius disputat valeat stabilitatem praeclarae conveniat",
      "Cave praeceptum oratio accederem geometria concederem adridens exquirere igitur fit",
      "Omnia archytam debemus persequi breve libidini iucundissime memoria aequius intellegi regulum bonorum familiaris dignum deprimet",
      "Quaerebam scientiam atque generis poterimus rationem abducas mala tribunus gestiant sequantur ante socratica",
      "Pertinacior contemnere vis sciat archytam effecta suavis investigatio confusioque mihi quaque maxima prosunt deseruit",
      "Inportuna una cupiditates sciret immo contrariae longe aristippi statu reprehendi",
      "Usque deserit illuc vultum appellas nihili nostrae mentio infelix genera mediocribus reperies iniquus putandum",
      "Ceteri torquatum rogavit familiarem plane secusne pecuniae iucundissime litteram an nimis"
    ],
    "_lp_faqs": [
      [
        "Fere mittimusdicitur vacuitate rationem contrario graviter fatebuntur vero fac minor oculorum disciplina?",
        "<p>Philosophus diligentius tabulae quoquo finis dubitamus optabiliorem institutis scripta effeminari cupiditas rogavit cornibus munus divitiae rursus vivi illuc corporis</p><p>Odio comprobatione illis disciplina aetatibus anteponam ludimur converte philosophis cyrenaici parvi</p>"
      ],
      [
        "Anaticulas liceat accidisset hac additis opiniones debilis ponatur elementa audientis usitate integritas disciplina?",
        "<p>Habeo decimum agas tarentum expetunt elegantius dicitur dignitati optimus hominem duas coronae confusio diogenem ipsam</p><p>Voluptatum suavis similes aliquo delectant hieronymus tandem</p>"
      ],
      [
        "Cupiditatem velim aliquem alterum tractatos virtute quidem simplicia verum commota iustam occultum quaeret?",
        "<p>Incideret omnium pollicentur natalem kakan sensitque tenueris stoici nummus similitudines totam illustrior vidisse expetenda debeas moribus so seseque adhibebat</p><p>Civis impudens oritur argumenta diviserunt audeo luxuriosus</p>"
      ],
      [
        "Leve lenius manliana exemplis virtute nimis posse brute possent videres oportebit gravis paulum iucundissime?",
        "<p>Tenueris hominis veteres accidisset accipio mercedem pleraque etiamsi habeo supremum ancillae ioca sententiis commentatus tuetur scias parens semper aptius motus</p><p>Aestimaretis istam theophrasto</p>"
      ],
      [
        "Severe licet torquatus meliusque officia voluptatis crede periculum praeponatur consentit ecquaenam illustrior interitum?",
        "<p>Nullam copiosiorem anulum suam paulo vir aliquod probavit consequentia fictas conventu audiamus virtutes maximarum</p><p>Molestum loquar aiebat disputat optimos profecto perspexerit originem</p>"
      ],
      [
        "Scilicet undique eae verum accusante multoque incrementum dissimillimas tubulus habent expectata sedulo praetermissum statim minuis?",
        "<p>Quemquam capite clariora cupiditatem debilis variari luxuriam scilicet labefactare dubitas voluit plato posui</p><p>Nomine anteponere ausus nominati consentaneum ponunt faciant eriperes confligendum audis</p><p>Vilissimis ages quaeram conare comparari vitam</p>"
      ],
      [
        "Rem mecum occurrentia expectoque illum aiat censeo hominem deserunt pridem ostentatio institutum nam?",
        "<p>Octavio beate commendas minus habeat superabat inflammat torquatus regem reiecta eculeo legimus vivendum nulla</p><p>Oculorum probas themistocles audissem meminerimus intervenire</p>"
      ]
    ],
    "_lp_course_result": "evaluate_lesson",
    "_lp_passing_condition": "80",
    "_lp_course_author": "1"
  }
}

 

10.List all lessons on the website


URL

Method

Params

Parameter

Type

Desciption

/wp-json/learnpress/v1/lessons

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

Response

[
  {
    "id": 86,
    "name": "Lesson 8",
    "slug": "lesson-8-2",
    "permalink": "http://learnpress4.local/lessons/lesson-8-2/",
    "date_created": "2021-04-14T06:38:03",
    "date_created_gmt": "2021-04-14T06:38:03",
    "date_modified": "2021-04-14T06:38:03",
    "date_modified_gmt": "2021-04-14T06:38:03",
    "status": "publish",
    "content": "<p>Villae promerem sequamur oblivisci satisne voluptatem elit perpetiuntur plurimis summoque divisione</p>n<p>Ceperit luxuriosus gaudebit philosophari debilitari dixit polemonis fugiunt tot imperatores impedit dicta</p>n<p>Tractatos erillus meo tota cuique profuso vestri isti voluntates gloriose diviserunt parum tenebris afferat unde mundum facillimum apti</p>n<p>Pertinacia vita extremum imperatores sese processerat cupidus datum reliquam refers ardentem egregio facile scripta nullo acupenseri diligenter neque aequum</p>n<p>Eademne illud volemus formosum nosmet oblectationem statim habentur vellem probo meum privasse grata laudatur expetunt loquor oppidum quibus</p>n<p>Comparandam philosophiae ego commota exclusis arripere curiosorum veniunt odit exquirere virtutis video</p>n<p>Scias multum mene appello emolumento audeo relinqueret ordiamur extremum igitur suavius aliis necessariae tubulum animantibus habitare eiuro probare mnesarchum statuat</p>n<p>Doctissimos agendum gestiant antiquis platoni privatio cernitur acti posthac iucundius magnificentia malo urgent materiam pylades laudatum</p>n<p>Rhetoribus postulo traditur peccata civitas nosmet stoicis media an quaesivit detractis</p>n<p>Orestem severe sapientiae sponte eius rectumne diogenem depingere solitum huic</p>n",
    "excerpt": "",
    "assigned": {
      "course": {
        "id": "66",
        "title": "Course 3",
        "slug": "course-3",
        "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
        "author": "1"
      }
    },
    "meta_data": {
      "_lp_duration": "",
      "_lp_preview": ""
    }
  },
  {
    "id": 85,
    "name": "Lesson 7",
    "slug": "lesson-7-2",
    "permalink": "http://learnpress4.local/lessons/lesson-7-2/",
    "date_created": "2021-04-14T06:38:03",
    "date_created_gmt": "2021-04-14T06:38:03",
    "date_modified": "2021-04-14T06:38:03",
    "date_modified_gmt": "2021-04-14T06:38:03",
    "status": "publish",
    "content": "<p>Aiebat natalis hieronymi gloriosa minuis transfer morbo illos reiecta ante arbitrantur pleniorem</p>n<p>Macello fugiunt mediocribus probandum institutis traduceret hebes praecordiis doctissimi peteret gubernando residamus mediocritate</p>n<p>Aliter hoc ab indoctum traduceret probare nondum debet scissem studebat statim magos p habent obiit corpus vester dicuntur</p>n<p>Videtis vivatur apud flumine macello hominem vim utebare peducaeus ei sapientiae communiter neminem expetenda accipio velim instituto artis</p>n<p>Quemquam occulta habere par integra mentio praeposatum rogavit moveor philosophari confecimus contemnere audacius officio obscurentur hieronymi</p>n<p>Luxuriosus brute dubitant arcana admonitionis intellegerem risu gratia laudata finiebat die definitio hactenus niteat superiores publicae easdem l</p>n<p>Popularia anulus veniendi requiras metrodori iracundia parvis delicatior tute media deesse ardentem beatissimum heredem praeteritis sequitur admirabilia</p>n<p>Venit quicum prave loquar excitaret dignos vacuitatem potestis incolumis deserunt chrysippo quot</p>n<p>Reiectus breve perdiscere honeste vere vite memini odit sensum sint ponunt vester signa zenone separantur</p>n<p>Urgent caret intellegere consequentia sapiente omnium potuerit commentatus utilitatem deesse dixisse regis distinctio vivi aeternum licebit docuit oritur</p>n",
    "excerpt": "",
    "assigned": {
      "course": {
        "id": "66",
        "title": "Course 3",
        "slug": "course-3",
        "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
        "author": "1"
      }
    },
    "meta_data": {
      "_lp_duration": "",
      "_lp_preview": ""
    }
  }
]

 

11.Retrieve a lesson


URL

Method

Params

Parameter

Type

Desciption

/wp-json/learnpress/v1/lessons/id

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

Response

{
  "id": 86,
  "name": "Lesson 8",
  "slug": "lesson-8-2",
  "permalink": "http://learnpress4.local/lessons/lesson-8-2/",
  "date_created": "2021-04-14T06:38:03",
  "date_created_gmt": "2021-04-14T06:38:03",
  "date_modified": "2021-04-14T06:38:03",
  "date_modified_gmt": "2021-04-14T06:38:03",
  "status": "publish",
  "content": "<p>Villae promerem sequamur oblivisci satisne voluptatem elit perpetiuntur plurimis summoque divisione</p>n<p>Ceperit luxuriosus gaudebit philosophari debilitari dixit polemonis fugiunt tot imperatores impedit dicta</p>n<p>Tractatos erillus meo tota cuique profuso vestri isti voluntates gloriose diviserunt parum tenebris afferat unde mundum facillimum apti</p>n<p>Pertinacia vita extremum imperatores sese processerat cupidus datum reliquam refers ardentem egregio facile scripta nullo acupenseri diligenter neque aequum</p>n<p>Eademne illud volemus formosum nosmet oblectationem statim habentur vellem probo meum privasse grata laudatur expetunt loquor oppidum quibus</p>n<p>Comparandam philosophiae ego commota exclusis arripere curiosorum veniunt odit exquirere virtutis video</p>n<p>Scias multum mene appello emolumento audeo relinqueret ordiamur extremum igitur suavius aliis necessariae tubulum animantibus habitare eiuro probare mnesarchum statuat</p>n<p>Doctissimos agendum gestiant antiquis platoni privatio cernitur acti posthac iucundius magnificentia malo urgent materiam pylades laudatum</p>n<p>Rhetoribus postulo traditur peccata civitas nosmet stoicis media an quaesivit detractis</p>n<p>Orestem severe sapientiae sponte eius rectumne diogenem depingere solitum huic</p>n",
  "excerpt": "",
  "assigned": {
    "course": {
      "id": "66",
      "title": "Course 3",
      "slug": "course-3",
      "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
      "author": "1"
    }
  },
  "meta_data": {
    "_lp_duration": "",
    "_lp_preview": ""
  }
}

 

12.List all quizzes on the website


URL

Method

Params

Parameter

Type

Desciption

/wp-json/learnpress/v1/quiz

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

Response

[
  {
    "id": 87,
    "name": "Quiz 4",
    "slug": "quiz-4-2",
    "permalink": "http://learnpress4.local/quizzes/quiz-4-2/",
    "date_created": "2021-04-14T06:38:03",
    "date_created_gmt": "2021-04-14T06:38:03",
    "date_modified": "2021-04-14T06:38:03",
    "date_modified_gmt": "2021-04-14T06:38:03",
    "status": "publish",
    "content": "<p>Quaerere vide turpis liberalis animadverti voluptatis vocatur sine sentiret statuam facinus videmusne liberius habentur</p>n<p>Sentiret verbi palatum corrigere praeposatum tardeve fugiunt donan minus flentes pius dices disceptari doctissimos</p>n",
    "excerpt": "",
    "assigned": {
      "course": {
        "id": "66",
        "title": "Course 3",
        "slug": "course-3",
        "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
        "author": "1"
      }
    },
    "meta_data": {
      "_lp_duration": "40 minute",
      "_lp_passing_grade": "60",
      "_lp_instant_check": "no",
      "_lp_negative_marking": "no",
      "_lp_retake_count": "0",
      "_lp_pagination": "1",
      "_lp_review": "yes"
    }
  },
  {
    "id": 79,
    "name": "Quiz 3",
    "slug": "quiz-3-3",
    "permalink": "http://learnpress4.local/quizzes/quiz-3-3/",
    "date_created": "2021-04-14T06:38:03",
    "date_created_gmt": "2021-04-14T06:38:03",
    "date_modified": "2021-04-14T06:38:03",
    "date_modified_gmt": "2021-04-14T06:38:03",
    "status": "publish",
    "content": "<p>Liberalis progressionis universa sentire  victoria corrigere debuerunt concedimus vulgo tueri te adipiscing</p>n<p>Victu sapientium simplicia appellet sequens scripta quaero imperio citius mortem ignorat rationem anulum aiat reprehensum avarus dubium vixerit</p>n",
    "excerpt": "",
    "assigned": {
      "course": {
        "id": "66",
        "title": "Course 3",
        "slug": "course-3",
        "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
        "author": "1"
      }
    },
    "meta_data": {
      "_lp_duration": "40 minute",
      "_lp_passing_grade": "50",
      "_lp_instant_check": "no",
      "_lp_negative_marking": "no",
      "_lp_retake_count": "0",
      "_lp_pagination": "1",
      "_lp_review": "yes"
    }
  }
]

 

13.Retrieve a quiz


URL

METHOD

PARAMS

Parameter

Type

Desciption

/wp-json/learnpress/v1/quiz/id

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

Response

{
    "id": 87,
    "name": "Quiz 4",
    "slug": "quiz-4-2",
    "permalink": "http://learnpress4.local/quizzes/quiz-4-2/",
    "date_created": "2021-04-14T06:38:03",
    "date_created_gmt": "2021-04-14T06:38:03",
    "date_modified": "2021-04-14T06:38:03",
    "date_modified_gmt": "2021-04-14T06:38:03",
    "status": "publish",
    "content": "<p>Quaerere vide turpis liberalis animadverti voluptatis vocatur sine sentiret statuam facinus videmusne liberius habentur</p>n<p>Sentiret verbi palatum corrigere praeposatum tardeve fugiunt donan minus flentes pius dices disceptari doctissimos</p>n",
    "excerpt": "",
    "assigned": {
      "course": {
        "id": "66",
        "title": "Course 3",
        "slug": "course-3",
        "content": "Risu illa philosophos actus optime locos comparatio gravius quieta praeterea contenti incidantrnrnScis cupiditate illis spe instituendarum coercendi recta ubi zenone velitrnrnVidebis comparandarum totas aestimabat torqueatur capienda facillimum gestiret gaudebit post illius frater deserit declinavi quidem euripidesconcludam",
        "author": "1"
      }
    },
    "meta_data": {
      "_lp_duration": "40 minute",
      "_lp_passing_grade": "60",
      "_lp_instant_check": "no",
      "_lp_negative_marking": "no",
      "_lp_retake_count": "0",
      "_lp_pagination": "1",
      "_lp_review": "yes"
    }
  }

 

14.List all user on the website


URL

METHOD

PARAMS

Parameter

Type

Desciption

/wp-json/learnpress/v1/users/

GET

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending.

orderby

string

Sort collection by object attribute.

slug

array

Limit result set to users with one or more specific slugs.

roles

array

Limit result set to users matching at least one specific role provided. Accepts csv list or single role.

who

string

Limit result set to users who are considered authors.

Respond

"[
  {
    ""id"": 4,
    ""username"": ""adasdasd"",
    ""name"": ""adasdasd"",
    ""first_name"": """",
    ""last_name"": """",
    ""email"": ""[email protected]"",
    ""url"": """",
    ""description"": """",
    ""link"": ""http://learnpress4.local/author/adasdasd/"",
    ""nickname"": ""adasdasd"",
    ""slug"": ""adasdasd"",
    ""tabs"": {
      ""overview"": {
        ""title"": ""Overview"",
        ""slug"": ""overview"",
        ""priority"": 10,
        ""icon"": ""<i fas fa-chalkboard-teacher""></i>"",
        ""content"": {
          ""statistic"": {
            ""enrolled_courses"": 1,
            ""active_courses"": 0,
            ""completed_courses"": 0,
            ""total_courses"": 0,
            ""total_users"": 0
          },
          ""featured"": [],
          ""latest"": [
            529,
            273,
            238,
            205,
            200,
            196,
            175
          ]
        }
      },
      ""courses"": {
        ""title"": ""Courses"",
        ""slug"": ""courses"",
        ""priority"": 15,
        ""icon"": ""<i fas fa-book-open""></i>"",
        ""content"": {
          ""enrolled"": {
            ""all"": [
              {
                ""id"": 200,
                ""graduation"": """",
                ""status"": """",
                ""start_time"": ""2021-06-11T02:51:15"",
                ""end_time"": false,
                ""expiration"": ""2021-08-20T02:51:15"",
                ""results"": []
              }
            ],
            ""finished"": [],
            ""passed"": [],
            ""failed"": []
          },
          ""created"": {
            ""all"": [
              175,
              196
            ],
            ""publish"": [
              175,
              196
            ],
            ""pending"": []
          }
        },
        ""section"": {
          ""enrolled"": {
            ""title"": ""Enrolled"",
            ""slug"": ""enrolled"",
            ""priority"": 10
          },
          ""created"": {
            ""title"": ""Created"",
            ""slug"": ""created"",
            ""priority"": 20
          }
        }
      },
      ""quizzes"": {
        ""title"": ""Quizzes"",
        ""slug"": ""quizzes"",
        ""priority"": 20,
        ""icon"": ""<i fas fa-puzzle-piece""></i>"",
        ""content"": """"
      },
      ""orders"": {
        ""title"": ""Orders"",
        ""slug"": ""orders"",
        ""priority"": 25,
        ""icon"": ""<i fas fa-shopping-cart""></i>"",
        ""content"": {
          ""542"": {
            ""order_key"": ""#0000000542"",
            ""total"": ""0"",
            ""currency"": ""USD"",
            ""status"": ""completed"",
            ""date"": ""2021-06-09T00:00:00""
          }
        }
      },
      ""order-details"": {
        ""title"": ""Order details"",
        ""slug"": ""order-details"",
        ""priority"": 30,
        ""icon"": """",
        ""content"": """"
      },
      ""settings"": {
        ""title"": ""Settings"",
        ""slug"": ""settings"",
        ""priority"": 35,
        ""icon"": ""<i fas fa-cog""></i>"",
        ""content"": """",
        ""section"": {
          ""basic-information"": {
            ""title"": ""General"",
            ""slug"": ""basic-information"",
            ""priority"": 10
          },
          ""avatar"": {
            ""title"": ""Avatar"",
            ""slug"": ""avatar"",
            ""priority"": 20
          },
          ""change-password"": {
            ""title"": ""Password"",
            ""slug"": ""change-password"",
            ""priority"": 30
          },
          ""privacy"": {
            ""title"": ""Privacy"",
            ""slug"": ""privacy"",
            ""priority"": 40
          }
        }
      },
      ""logout"": {
        ""title"": ""Logout"",
        ""slug"": ""lp-logout"",
        ""priority"": 40,
        ""icon"": ""<i fas fa-sign-out-alt""></i>"",
        ""content"": """"
      }
    },
    ""custom_register"": {
      ""displayname"": {
        ""title"": ""Display name"",
        ""type"": ""text"",
        ""required"": ""no"",
        ""value"": """"
      },
      ""firstname"": {
        ""title"": ""First name"",
        ""type"": ""text"",
        ""required"": ""no"",
        ""value"": """"
      }
    },
    ""avatar_urls"": {
      ""24"": ""http://0.gravatar.com/avatar/38743940073e43b1475fa2093ce30286?s=24&d=mm&r=g"",
      ""48"": ""http://0.gravatar.com/avatar/38743940073e43b1475fa2093ce30286?s=48&d=mm&r=g"",
      ""96"": ""http://0.gravatar.com/avatar/38743940073e43b1475fa2093ce30286?s=96&d=mm&r=g""
    },
    ""meta"": [],
    ""_links"": {
      ""self"": [
        {
          ""href"": ""http://learnpress4.local/wp-json/learnpress/v1/users/4""
        }
      ],
      ""collection"": [
        {
          ""href"": ""http://learnpress4.local/wp-json/learnpress/v1/users""
        }
      ]
    }
  },
  {
    ""id"": 1,
    ""username"": ""admin"",
    ""name"": ""admin"",
    ""first_name"": ""dao"",
    ""last_name"": ""nham"",
    ""email"": ""[email protected]"",
    ""url"": ""http://learnpress4.local"",
    ""description"": """",
    ""link"": ""http://learnpress4.local/author/admin/"",
    ""nickname"": ""admin"",
    ""slug"": ""admin"",
    ""tabs"": {
      ""overview"": {
        ""title"": ""Overview"",
        ""slug"": ""overview"",
        ""priority"": 10,
        ""icon"": ""<i fas fa-chalkboard-teacher""></i>"",
        ""content"": {
          ""statistic"": {
            ""enrolled_courses"": 1,
            ""active_courses"": 0,
            ""completed_courses"": 0,
            ""total_courses"": 7,
            ""total_users"": 1
          },
          ""featured"": [],
          ""latest"": [
            529,
            273,
            238,
            205,
            200,
            196,
            175
          ]
        }
      },
      ""courses"": {
        ""title"": ""Courses"",
        ""slug"": ""courses"",
        ""priority"": 15,
        ""icon"": ""<i fas fa-book-open""></i>"",
        ""content"": {
          ""enrolled"": {
            ""all"": [
              {
                ""id"": 200,
                ""graduation"": """",
                ""status"": """",
                ""start_time"": ""2021-06-11T02:51:15"",
                ""end_time"": false,
                ""expiration"": ""2021-08-20T02:51:15"",
                ""results"": []
              }
            ],
            ""finished"": [],
            ""passed"": [],
            ""failed"": []
          },
          ""created"": {
            ""all"": [
              175,
              196
            ],
            ""publish"": [
              175,
              196
            ],
            ""pending"": []
          }
        },
        ""section"": {
          ""enrolled"": {
            ""title"": ""Enrolled"",
            ""slug"": ""enrolled"",
            ""priority"": 10
          },
          ""created"": {
            ""title"": ""Created"",
            ""slug"": ""created"",
            ""priority"": 20
          }
        }
      },
      ""quizzes"": {
        ""title"": ""Quizzes"",
        ""slug"": ""quizzes"",
        ""priority"": 20,
        ""icon"": ""<i fas fa-puzzle-piece""></i>"",
        ""content"": """"
      },
      ""orders"": {
        ""title"": ""Orders"",
        ""slug"": ""orders"",
        ""priority"": 25,
        ""icon"": ""<i fas fa-shopping-cart""></i>"",
        ""content"": {
          ""542"": {
            ""order_key"": ""#0000000542"",
            ""total"": ""0"",
            ""currency"": ""USD"",
            ""status"": ""completed"",
            ""date"": ""2021-06-09T00:00:00""
          }
        }
      },
      ""order-details"": {
        ""title"": ""Order details"",
        ""slug"": ""order-details"",
        ""priority"": 30,
        ""icon"": """",
        ""content"": """"
      },
      ""settings"": {
        ""title"": ""Settings"",
        ""slug"": ""settings"",
        ""priority"": 35,
        ""icon"": ""<i fas fa-cog""></i>"",
        ""content"": """",
        ""section"": {
          ""basic-information"": {
            ""title"": ""General"",
            ""slug"": ""basic-information"",
            ""priority"": 10
          },
          ""avatar"": {
            ""title"": ""Avatar"",
            ""slug"": ""avatar"",
            ""priority"": 20
          },
          ""change-password"": {
            ""title"": ""Password"",
            ""slug"": ""change-password"",
            ""priority"": 30
          },
          ""privacy"": {
            ""title"": ""Privacy"",
            ""slug"": ""privacy"",
            ""priority"": 40
          }
        }
      },
      ""logout"": {
        ""title"": ""Logout"",
        ""slug"": ""lp-logout"",
        ""priority"": 40,
        ""icon"": ""<i fas fa-sign-out-alt""></i>"",
        ""content"": """"
      }
    },
    ""custom_register"": {
      ""displayname"": {
        ""title"": ""Display name"",
        ""type"": ""text"",
        ""required"": ""no"",
        ""value"": """"
      },
      ""firstname"": {
        ""title"": ""First name"",
        ""type"": ""text"",
        ""required"": ""no"",
        ""value"": """"
      }
    },
    ""avatar_urls"": {
      ""24"": ""http://1.gravatar.com/avatar/1be2e83062b314c106b13993a14f2504?s=24&d=mm&r=g"",
      ""48"": ""http://1.gravatar.com/avatar/1be2e83062b314c106b13993a14f2504?s=48&d=mm&r=g"",
      ""96"": ""http://1.gravatar.com/avatar/1be2e83062b314c106b13993a14f2504?s=96&d=mm&r=g""
    },
    ""meta"": [],
    ""_links"": {
      ""self"": [
        {
          ""href"": ""http://learnpress4.local/wp-json/learnpress/v1/users/1""
        }
      ],
      ""collection"": [
        {
          ""href"": ""http://learnpress4.local/wp-json/learnpress/v1/users""
        }
      ]
    }
  }
]"






 

15.List all my course


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/courses/?learned=true

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

category

string

Limit result set to courses assigned a specific category ID. Example: category=[1,2]

tag

string

Limit result set to courses assigned a specific tag ID.

course_filter
( in-progress, passed, failed)

string

Get Course in-progress, passed, failed

Respond

"{
  ""id"": 10,
  ""name"": ""Course 1"",
  ""slug"": ""course-1"",
  ""permalink"": ""http://learnpress4.local/courses/course-1/"",
  ""image"": ""http://learnpress4.local/wp-content/plugins/learnpress/assets/images/placeholder-500x300.jpg"",
  ""date_created"": ""2021-04-14T04:23:39"",
  ""date_created_gmt"": ""2021-04-14T04:23:39"",
  ""date_modified"": ""2021-04-14T09:51:38"",
  ""date_modified_gmt"": ""2021-04-14T09:51:38"",
  ""on_sale"": false,
  ""status"": ""publish"",
  ""content"": ""<p>Molestum fabulas quacumque obscurari errat inponebat legem despiciendis stante vacabit aetatibus reprehendat loquitur enitar aegyptum statui certum aristo dilucide</p>n<p>Accessio festo cuiusquam conquiescere mentio ostentatio tenebris veterum gestiant cupidus vix nulla originem ausus nimis mediocribus intellegetur dicam</p>n"",
  ""excerpt"": """",
  ""categories"": [],
  ""tags"": [],
  ""sections"": [
    {
      ""id"": ""1"",
      ""title"": ""Section 1"",
      ""course_id"": 10,
      ""description"": ""Licere usum posthac obrui redarguitur plato dixit magnitudinis seseque inesse et eam"",
      ""items"": [
        {
          ""id"": 11,
          ""type"": ""lp_lesson"",
          ""title"": ""Lesson 1"",
          ""preview"": true
        },
        {
          ""id"": 12,
          ""type"": ""lp_quiz"",
          ""title"": ""Quiz 1"",
          ""preview"": false
        }
      ],
      ""order"": ""0""
    },
    {
      ""id"": ""2"",
      ""title"": ""Section 2"",
      ""course_id"": 10,
      ""description"": ""Admirationis conclusum aliquantum istic pollicetur praeceptis explicavisset nimis tertium initiis istius"",
      ""items"": [
        {
          ""id"": 18,
          ""type"": ""lp_lesson"",
          ""title"": ""Lesson 2"",
          ""preview"": true
        },
        {
          ""id"": 19,
          ""type"": ""lp_lesson"",
          ""title"": ""Lesson 3"",
          ""preview"": false
        },
        {
          ""id"": 20,
          ""type"": ""lp_quiz"",
          ""title"": ""Quiz 2"",
          ""preview"": false
        }
      ],
      ""order"": ""1""
    },
    {
      ""id"": ""3"",
      ""title"": ""Section 3"",
      ""course_id"": 10,
      ""description"": ""Victoria nunc verso gumias desciscendi platoni posthac videor peripateticis ipsos rebus convincunturque quiddam oppidum depravatae"",
      ""items"": [
        {
          ""id"": 24,
          ""type"": ""lp_lesson"",
          ""title"": ""Lesson 4"",
          ""preview"": true
        },
        {
          ""id"": 25,
          ""type"": ""lp_quiz"",
          ""title"": ""Quiz 3"",
          ""preview"": false
        }
      ],
      ""order"": ""2""
    }
  ],
  ""meta_data"": {
    ""_lp_duration"": ""10 week"",
    ""_lp_block_expire_duration"": ""no"",
    ""_lp_block_finished"": ""no"",
    ""_lp_level"": """",
    ""_lp_students"": ""10"",
    ""_lp_max_students"": ""1000"",
    ""_lp_retake_count"": ""0"",
    ""_lp_has_finish"": ""yes"",
    ""_lp_featured"": ""no"",
    ""_lp_featured_review"": ""Commodaita simile catone coletur intellegere excelsiores censeo exquirere affectum amicitiis spectare eaedem incredibile absolvi vetustate vitiosa belle qualem licere estad utrumque comparandis fortasse potes quintus oppressum dicam obscurari mallem praesidii actus incolumis iustitiae"",
    ""_lp_external_link_buy_course"": """",
    ""_lp_prerequisite_allow_purchase"": """",
    ""_lp_course_prerequisite"": """",
    ""_lp_price"": """",
    ""_lp_sale_price"": """",
    ""_lp_sale_start"": """",
    ""_lp_sale_end"": """",
    ""_lp_requirements"": [
      ""Prudenter sui pythagoras virtutis orationis re reiciendam erigimur acies gaudio valet"",
      ""Cupiditate thorius haeret stabile sui aperiendum primum similis instructus sirenum ingenio perspicuum"",
      ""Absurdum honestatis hereditate restinctionis quicquid antiocho finxerit terram victu rationem"",
      ""Exilem fortis agitur philosophi fugiam terram proficiscitur vetant coronae omnes"",
      ""Sententia interitum erigimur praecepta pertinacem amico elit solitudo hominibus iocabor tenueris levatio praeterea iucundi"",
      ""Oportet virtuti tractatos ceperit officii rogatione intrandum nec sentiret pythagoras virtutem voluntates diodorus kakaw promerem"",
      ""Emolumenta recordamur faciat ais pressius cenabat obscurius tributa eundem sed"",
      ""Dicat mendicus dixisti aiebat corporis pius legem vitiosum postulo conveniunt""
    ],
    ""_lp_target_audiences"": [
      ""Plebiscito dicam vultis cognitum oculorum primum plebem appellantur sublatis motu invidiam pueris gaudio respondeas"",
      ""Gravissimo regiones facilior aliena minus deum loquar sullae multarum sequamini appellant quaeram rem fruitur"",
      ""Negas caperet aristo narrare lanx optime praeceptum inquit praecordiis antea inconstantissime"",
      ""Statui concinant restincta ponimus pulsi absolvere facio probandum rectissime voluptatibus virtutem civitatis"",
      ""Gloriosa comprobatione lenius intervenire sempiternam condemnata constituta vides felicem res habetur perge frater expectare"",
      ""Praetore antiquis diceretur viderentur scripta quae quovis emolumento quoniam galloni sponte illustris pudori magnarum timore"",
      ""Magni aliqui dixerimus valde possumus dederetur vulnera dicimus probas conferam labor"",
      ""Laus homines dici relinquet galloni enam censore docet dulce inconstantiae"",
      ""Domus nostrum ponis eam tuae autem lapathi undique adoptionem faceret poteris additis velit institisset pueris"",
      ""Quale esto estad nominare praeteritis suffragio reprehensione serviremus valitudo mutare m longissimus tria concessis""
    ],
    ""_lp_key_features"": [
      ""Malitias gaudebit praesidium intuens oppressum nosmet earum habet proverbium dolere ante callida peragratas habitus macello"",
      ""Voles mihi sapienti nostrae ususque fruentem status graviter rationem sensus"",
      ""Nondum voluptates existimabit optatius vos separantur aestimaretis instituto residamus sese decimano"",
      ""Declinavi quaerimus actionemque commotus habeatur peducaeus sane triarius disputat valeat stabilitatem praeclarae conveniat"",
      ""Cave praeceptum oratio accederem geometria concederem adridens exquirere igitur fit"",
      ""Omnia archytam debemus persequi breve libidini iucundissime memoria aequius intellegi regulum bonorum familiaris dignum deprimet"",
      ""Quaerebam scientiam atque generis poterimus rationem abducas mala tribunus gestiant sequantur ante socratica"",
      ""Pertinacior contemnere vis sciat archytam effecta suavis investigatio confusioque mihi quaque maxima prosunt deseruit"",
      ""Inportuna una cupiditates sciret immo contrariae longe aristippi statu reprehendi"",
      ""Usque deserit illuc vultum appellas nihili nostrae mentio infelix genera mediocribus reperies iniquus putandum"",
      ""Ceteri torquatum rogavit familiarem plane secusne pecuniae iucundissime litteram an nimis""
    ],
    ""_lp_faqs"": [
      [
        ""Fere mittimusdicitur vacuitate rationem contrario graviter fatebuntur vero fac minor oculorum disciplina?"",
        ""<p>Philosophus diligentius tabulae quoquo finis dubitamus optabiliorem institutis scripta effeminari cupiditas rogavit cornibus munus divitiae rursus vivi illuc corporis</p><p>Odio comprobatione illis disciplina aetatibus anteponam ludimur converte philosophis cyrenaici parvi</p>""
      ],
      [
        ""Anaticulas liceat accidisset hac additis opiniones debilis ponatur elementa audientis usitate integritas disciplina?"",
        ""<p>Habeo decimum agas tarentum expetunt elegantius dicitur dignitati optimus hominem duas coronae confusio diogenem ipsam</p><p>Voluptatum suavis similes aliquo delectant hieronymus tandem</p>""
      ],
      [
        ""Cupiditatem velim aliquem alterum tractatos virtute quidem simplicia verum commota iustam occultum quaeret?"",
        ""<p>Incideret omnium pollicentur natalem kakan sensitque tenueris stoici nummus similitudines totam illustrior vidisse expetenda debeas moribus so seseque adhibebat</p><p>Civis impudens oritur argumenta diviserunt audeo luxuriosus</p>""
      ],
      [
        ""Leve lenius manliana exemplis virtute nimis posse brute possent videres oportebit gravis paulum iucundissime?"",
        ""<p>Tenueris hominis veteres accidisset accipio mercedem pleraque etiamsi habeo supremum ancillae ioca sententiis commentatus tuetur scias parens semper aptius motus</p><p>Aestimaretis istam theophrasto</p>""
      ],
      [
        ""Severe licet torquatus meliusque officia voluptatis crede periculum praeponatur consentit ecquaenam illustrior interitum?"",
        ""<p>Nullam copiosiorem anulum suam paulo vir aliquod probavit consequentia fictas conventu audiamus virtutes maximarum</p><p>Molestum loquar aiebat disputat optimos profecto perspexerit originem</p>""
      ],
      [
        ""Scilicet undique eae verum accusante multoque incrementum dissimillimas tubulus habent expectata sedulo praetermissum statim minuis?"",
        ""<p>Quemquam capite clariora cupiditatem debilis variari luxuriam scilicet labefactare dubitas voluit plato posui</p><p>Nomine anteponere ausus nominati consentaneum ponunt faciant eriperes confligendum audis</p><p>Vilissimis ages quaeram conare comparari vitam</p>""
      ],
      [
        ""Rem mecum occurrentia expectoque illum aiat censeo hominem deserunt pridem ostentatio institutum nam?"",
        ""<p>Octavio beate commendas minus habeat superabat inflammat torquatus regem reiecta eculeo legimus vivendum nulla</p><p>Oculorum probas themistocles audissem meminerimus intervenire</p>""
      ]
    ],
    ""_lp_course_result"": ""evaluate_lesson"",
    ""_lp_passing_condition"": ""80"",
    ""_lp_course_author"": ""1""
  }
}"











 

16.When the course is purchased, the Add to Cart button is replaced with Start now


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/courses/enroll

POST

id

integer

course id

17.Finish course


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/courses/finish

POST

id

integer

course id

Respond

"{  
""status"": ""success"",  
""message"": ""Congrats! You complete Course is successfully"",  
""data"": {} 
}"

 

18.Retake course


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/courses/retake

POST

id

integer

course id

Respond

"{  
""status"": ""success"",  
""message"": ""Now you can learn this course"",  
""data"": {  ""url_redirect"": ""http://learnpress4.local/courses/course-1/quizzes/quiz-1/""  } 
}"

 

19.Finish lesson


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/lessons/finish

POST

id

integer

Lesson ID

20.Start quiz


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/quiz/start

POST

id

integer

Quiz ID

Respond

"{
  ""success"": true,
  ""message"": ""Success!"",
  ""results"": {
    ""question_ids"": [
      198,
      199
    ],
    ""questions"": [
      {
        ""id"": 198,
        ""title"": ""Question 1"",
        ""type"": ""single_choice"",
        ""point"": 1,
        ""content"": ""<p>Vim vobis haberem appellocommunia probabantur crimen doloris sempiternam divinum commoventur</p>n<p>Tamquam dicentibus attuleris callidus sapientem anguiculos tutiorem perfecit dixissent inchoatum</p>n"",
        ""hint"": ""Hint"",
        ""options"": [
          {
            ""title"": ""[TRUE] - Quic portenta diviserunt poteris vocatur omnes compensabatur necne placet hae tecum sequatur"",
            ""value"": ""5f2674eb"",
            ""uid"": 221
          }
        ]
      },
      {
        ""id"": 199,
        ""title"": ""Question 2"",
        ""type"": ""multi_choice"",
        ""point"": 1,
        ""content"": ""<p>Fortior institutionis epicurei excitaret delectatus existimare quarum cornibus d animum eandem prioris quibusnam malitias virtutis paradoca praestantissimum quaereremus confligendum pleraque</p>n<p>Cupiditas tutiorem avarus necesse sermone omni liquidius rhetorice praetervolavit paene ais pertimuit rectissime statueris</p>n"",
        ""options"": [
          {
            ""title"": "" [TRUE] - Concordiae domus homines loco exul proclivi commota edere aperiendum constituto praeposita"",
            ""value"": ""fd9069eb"",
            ""uid"": 222
          }
        ]
      }
    ],
    ""total_time"": 2400,
    ""end_time"": ""2021-07-14 08:27:40"",
    ""duration"": 2400,
    ""answered"": {
      ""198"": {
        ""correct"": false,
        ""mark"": 0,
        ""answered"": """"
      },
      ""199"": {
        ""correct"": false,
        ""mark"": 0,
        ""answered"": """"
      }
    },
    ""status"": ""started"",
    ""results"": {
      ""questions"": {
        ""198"": {
          ""correct"": false,
          ""mark"": 0,
          ""answered"": """"
        },
        ""199"": {
          ""correct"": false,
          ""mark"": 0,
          ""answered"": """"
        }
      },
      ""mark"": 2,
      ""user_mark"": 0,
      ""question_count"": 2,
      ""question_empty"": 2,
      ""question_answered"": 0,
      ""question_wrong"": 0,
      ""question_correct"": 0,
      ""status"": ""started"",
      ""result"": 0,
      ""time_spend"": ""--:--"",
      ""passing_grade"": ""90%"",
      ""user_item_id"": ""464"",
      ""interval"": [
        {
          ""date"": ""2021-07-14 07:47:40.000000"",
          ""timezone_type"": 1,
          ""timezone"": ""+00:00""
        },
        false
      ],
      ""graduation"": ""in-progress"",
      ""graduationText"": ""in-progress""
    },
    ""retaken"": 0,
    ""attempts"": [],
    ""user_item_id"": ""464""
  }
}"

 

21.Check answer


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/quiz/check_answer

POST

id

integer

Quiz ID

answered

string

Answered this question

Respond

"{
  ""explanation"": """",
  ""options"": [
    {
      ""title"": ""[TRUE] - Quic portenta diviserunt poteris vocatur omnes compensabatur necne placet hae tecum sequatur"",
      ""value"": ""5f2674eb"",
      ""is_true"": ""yes"",
      ""uid"": 221
    }
  ],
  ""result"": {
    ""correct"": true,
    ""mark"": 1,
    ""answered"": ""5f2674eb""
  }
}"

 

22.Finish quiz


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/quiz/finish

POST

id

integer

Quiz ID

answered

object

Answered all question

Respond

"{
  ""success"": true,
  ""message"": ""Success!"",
  ""results"": {
    ""questions"": {
      ""198"": {
        ""explanation"": """",
        ""options"": [
          {
            ""title"": ""[TRUE] - Quic portenta diviserunt poteris vocatur omnes compensabatur necne placet hae tecum sequatur"",
            ""value"": ""5f2674eb"",
            ""is_true"": ""yes"",
            ""uid"": 221
          }
        ]
      },
      ""199"": {
        ""explanation"": """",
        ""options"": [
          {
            ""title"": "" [TRUE] - Concordiae domus homines loco exul proclivi commota edere aperiendum constituto praeposita"",
            ""value"": ""fd9069eb"",
            ""is_true"": ""yes"",
            ""uid"": 222
          }
        ]
      }
    },
    ""answered"": {
      ""198"": {
        ""correct"": true,
        ""mark"": 1,
        ""answered"": ""5f2674eb""
      },
      ""199"": {
        ""correct"": false,
        ""mark"": 0,
        ""answered"": """"
      }
    },
    ""status"": ""completed"",
    ""results"": {
      ""questions"": {
        ""198"": {
          ""correct"": true,
          ""mark"": 1,
          ""answered"": ""5f2674eb""
        },
        ""199"": {
          ""correct"": false,
          ""mark"": 0,
          ""answered"": """"
        }
      },
      ""mark"": 2,
      ""user_mark"": 1,
      ""question_count"": 2,
      ""question_empty"": 1,
      ""question_answered"": 1,
      ""question_wrong"": 0,
      ""question_correct"": 1,
      ""status"": ""completed"",
      ""result"": 50,
      ""time_spend"": ""01:25:55"",
      ""passing_grade"": ""90%"",
      ""user_item_id"": ""464"",
      ""interval"": [
        {
          ""date"": ""2021-07-14 07:47:40.000000"",
          ""timezone_type"": 1,
          ""timezone"": ""+00:00""
        },
        {
          ""date"": ""2021-07-14 09:13:35.000000"",
          ""timezone_type"": 1,
          ""timezone"": ""+00:00""
        }
      ],
      ""graduation"": ""failed"",
      ""graduationText"": ""Failed""
    },
    ""attempts"": []
  }
}"

 

23.Retrieve course category


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/wp/v2/course_category

GET

24.API for Assignment

Requires to install the Assignment plugin to get the API

25.Get All Assignment


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/

GET

context

string

Scope under which the request is made; determines fields present in response. Options: "view" and "edit". Default is "view".

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 10

search

string

Limit results to those matching a string.

after

string

Limit response to resources published after a given ISO8601 compliant date.

before

string

Limit response to resources published before a given ISO8601 compliant date.

exclude

array

Ensure result set excludes specific IDs.

include

array

Limit result set to specific IDs.

offset

integer

Offset the result set by a specific number of items.

order

string

Order sort attribute ascending or descending. Options: "asc" and "desc". Default is "desc".

orderby

string

Sort collection by object attribute. Options: "date", "id", "include", "title" and "slug". Default is "date".

Respond

[
    {
        "id": 1220,
        "name": "assignment 1",
        "slug": "assignment-1",
        "permalink": "https://test.thimpress.com/courses/course-has-assignment-2/assignments/assignment-1/",
        "date_created": "2021-09-17T10:08:06",
        "date_created_gmt": "2021-09-17T03:08:06",
        "date_modified": "2021-09-17T10:10:04",
        "date_modified_gmt": "2021-09-17T03:10:04",
        "status": "publish",
        "content": "<p><iframe loading="lazy" title="Tổng hợp những câu nói cực &quot;thấm&quot; trong Táo Quân 2018 | VTV24" width="750" height="422" src="https://www.youtube.com/embed/UjkavnKvnhw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>n<header class="the-article-header">n<p class="the-article-category"><a class="parent_cate" title="Sức khỏe" href="https://zingnews.vn/suc-khoe.html">SỨC KHỎE</a></p>n<h1 class="the-article-title">Hà Nội ghi nhận 12 người nhiễm nCoV trong cộng đồng ngày 23/8</h1>n<ul class="the-article-meta">n<li class="the-article-author"><a href="https://zingnews.vn/Qu%E1%BB%91c-To%C3%A0n-tim-kiem.html?type=3">Quốc Toàn</a></li>n<li class="the-article-publish">Thứ hai, 23/8/2021 18:53 (GMT+7)</li>n</ul>n</header>n<section class="main">n<p class="the-article-summary">Từ 12h đến 18h ngày 23/8, thành phố phát hiện thêm 2 trường hợp có kết quả xét nghiệm dương tính với virus trong cộng đồng.</p>n<div class="the-article-body">n<p>Theo thông tin từ Sở Y tế Hà Nội tối 23/8, thành phố vừa ghi nhận thêm 13 trường hợp có kết quả xét nghiệm dương tính với SARS-CoV-2. Trong đó, 2 người tại cộng đồng, 11 trường hợp còn lại trong khu cách ly, vùng phong tỏa.</p>n<p><strong>2 người nhiễm nCoV tại cộng đồng gồm:</strong></p>n<p>D.N.K., nam, 67 tuổi, trú tại ngõ 63 Vũ Trọng Phụng, Thanh Xuân Trung, Thanh Xuân. Người này có biểu hiện sốt từ ngày 22/8 và chủ động đi xét nghiệm tại bệnh viện cho kết quả dương tính với virus ngày 23/8.</p>n<p>T.T.N., nữ, 55 tuổi, ngụ Quang Trung, Hà Đông. Bà N. sống trong khu vực bị phong tỏa từ ngày 20/8 (gần gia đình 5 người dương tính với virus được phát hiện qua xét nghiệm sàng lọc). Ngày 22/8, người này được lấy mẫu và cũng cho kết quả dương tính với nCoV.</p>n<p><strong>11 trường hợp đã cách ly hoặc sống trong vùng phong tỏa gồm:</strong></p>n<p>Gia đình 3 người cùng trú tại Trần Quý Cáp, Văn Chương, Đống Đa. Họ là bố, mẹ và em gái của một trường hợp F0 đã được phát hiện trước đó.</p>n<p>N.T.Đ., nam, 32 tuổi, ngụ thôn Bầu, Kim Chung, Đông Anh. Anh Đ. là F1 và được lấy mẫu xét nghiệm, chuyển đi cách ly tập trung từ ngày 15/8. Tới ngày 22/8, người này có triệu chứng, được lấy mẫu xét nghiệm và cho kết quả dương tính.</p>n<p>H.T.M.T., nữ, 15 tuổi, có địa chỉ ở tổ 35, Đông Anh, Đông Anh. Trường hợp này cũng có tiền sử tiếp xúc với F0 và được cách ly từ ngày 16/8.</p>n<p>B.M.Đ., nam, 32 tuổi, ở Thôn Bầu, Kim Chung, Đông Anh. Anh Đ. là F1 và được cách ly từ ngày 25/8.</p>n<p>N.Q.H., nam, 42 tuổi, trú tại Thanh Hà, Đồng Xuân, Hoàn Kiếm. Trước đó, ông H. đã hoàn thành cách ly về địa phương ngày 18/8 sau khi đi cùng chuyến xe với F0. Ông cách ly tại nhà đến 22/8 thì có kết quả xét nghiệm dương tính với nCoV.</p>n<p>2 trường hợp cùng ngụ ở 175 Phúc Tân, Phúc Tân, Hoàn Kiếm là V.N.S. (nam, 29 tuổi) và N.T.N. (nữ, 24 tuổi). Họ đã được đưa đi cách ly tập trung tại Gia Lâm từ ngày 5/8 và có nhiều lần âm tính với virus. Tuy nhiên, lần lượt các ngày 19 và 21/8, họ xuất hiện các triệu chứng đau đầu, sốt và được xét nghiệm lại có kết quả dương tính.</p>n<p>N.T.T., nữ, 59 tuổi, ở đội 4, Ngọc Hồi, Thanh Trì. Người này là F1 và đã được cách ly tập trung trước đó.</p>n<p>Trường hợp cuối cùng là N.P.L., nữ, 34 tuổi, có địa chỉ tại Hòa Lương, Hà Hồi, Thường Tín. Chị L. từng tiếp xúc với F0, được cách ly từ ngày 9/8 và có kết quả xét nghiệm dương tính ngày 22/8.</p>n</div>n</section>n",
        "excerpt": "",
        "assigned": {
            "course": {
                "id": "1190",
                "title": "Course has assignment 2",
                "slug": "course-has-assignment-2",
                "content": "<p>Statu annum laus iracundia actionemque diligunt rationem enim praesidii restincta detractus particulas istic quaesita aristotele vi aiebat manilium suavis</p><p>Gerendarum disputatione utendum dignitatem prorsus ausus</p>",
                "author": "1"
            }
        },
        "retake_count": 2,
        "retaken": 1,
        "duration": {
            "format": "02 hours",
            "time": 7200
        },
        "introdution": "Tham khảo Google.com",
        "passing_grade": "6",
        "allow_file_type": "jpg,txt,zip,pdf,doc,docx,ppt",
        "files_amount": 2,
        "attachment": [
            {
                "id": "67",
                "url": "https://test.thimpress.com/wp-content/uploads/2021/04/logo-1.jpg",
                "name": "logo-1.jpg"
            }
        ],
        "results": {
            "status": "started",
            "start_time": "2021-09-20T14:39:08",
            "expiration_time": "2021-09-20T16:39:08",
            "end_time": ""
        },
        "assignment_answer": {
            "note": "student nộp bài",
            "file": []
        },
        "evaluation": []
    }
]

 

26.Get An Assignment


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/id

GET
{
    "id": 1220,
    "name": "assignment 1",
    "slug": "assignment-1",
    "permalink": "https://test.thimpress.com/courses/course-has-assignment-2/assignments/assignment-1/",
    "date_created": "2021-09-17T10:08:06",
    "date_created_gmt": "2021-09-17T03:08:06",
    "date_modified": "2021-09-17T10:10:04",
    "date_modified_gmt": "2021-09-17T03:10:04",
    "status": "publish",
    "content": "<p><iframe loading="lazy" title="Tổng hợp những câu nói cực &quot;thấm&quot; trong Táo Quân 2018 | VTV24" width="750" height="422" src="https://www.youtube.com/embed/UjkavnKvnhw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>n<header class="the-article-header">n<p class="the-article-category"><a class="parent_cate" title="Sức khỏe" href="https://zingnews.vn/suc-khoe.html">SỨC KHỎE</a></p>n<h1 class="the-article-title">Hà Nội ghi nhận 12 người nhiễm nCoV trong cộng đồng ngày 23/8</h1>n<ul class="the-article-meta">n<li class="the-article-author"><a href="https://zingnews.vn/Qu%E1%BB%91c-To%C3%A0n-tim-kiem.html?type=3">Quốc Toàn</a></li>n<li class="the-article-publish">Thứ hai, 23/8/2021 18:53 (GMT+7)</li>n</ul>n</header>n<section class="main">n<p class="the-article-summary">Từ 12h đến 18h ngày 23/8, thành phố phát hiện thêm 2 trường hợp có kết quả xét nghiệm dương tính với virus trong cộng đồng.</p>n<div class="the-article-body">n<p>Theo thông tin từ Sở Y tế Hà Nội tối 23/8, thành phố vừa ghi nhận thêm 13 trường hợp có kết quả xét nghiệm dương tính với SARS-CoV-2. Trong đó, 2 người tại cộng đồng, 11 trường hợp còn lại trong khu cách ly, vùng phong tỏa.</p>n<p><strong>2 người nhiễm nCoV tại cộng đồng gồm:</strong></p>n<p>D.N.K., nam, 67 tuổi, trú tại ngõ 63 Vũ Trọng Phụng, Thanh Xuân Trung, Thanh Xuân. Người này có biểu hiện sốt từ ngày 22/8 và chủ động đi xét nghiệm tại bệnh viện cho kết quả dương tính với virus ngày 23/8.</p>n<p>T.T.N., nữ, 55 tuổi, ngụ Quang Trung, Hà Đông. Bà N. sống trong khu vực bị phong tỏa từ ngày 20/8 (gần gia đình 5 người dương tính với virus được phát hiện qua xét nghiệm sàng lọc). Ngày 22/8, người này được lấy mẫu và cũng cho kết quả dương tính với nCoV.</p>n<p><strong>11 trường hợp đã cách ly hoặc sống trong vùng phong tỏa gồm:</strong></p>n<p>Gia đình 3 người cùng trú tại Trần Quý Cáp, Văn Chương, Đống Đa. Họ là bố, mẹ và em gái của một trường hợp F0 đã được phát hiện trước đó.</p>n<p>N.T.Đ., nam, 32 tuổi, ngụ thôn Bầu, Kim Chung, Đông Anh. Anh Đ. là F1 và được lấy mẫu xét nghiệm, chuyển đi cách ly tập trung từ ngày 15/8. Tới ngày 22/8, người này có triệu chứng, được lấy mẫu xét nghiệm và cho kết quả dương tính.</p>n<p>H.T.M.T., nữ, 15 tuổi, có địa chỉ ở tổ 35, Đông Anh, Đông Anh. Trường hợp này cũng có tiền sử tiếp xúc với F0 và được cách ly từ ngày 16/8.</p>n<p>B.M.Đ., nam, 32 tuổi, ở Thôn Bầu, Kim Chung, Đông Anh. Anh Đ. là F1 và được cách ly từ ngày 25/8.</p>n<p>N.Q.H., nam, 42 tuổi, trú tại Thanh Hà, Đồng Xuân, Hoàn Kiếm. Trước đó, ông H. đã hoàn thành cách ly về địa phương ngày 18/8 sau khi đi cùng chuyến xe với F0. Ông cách ly tại nhà đến 22/8 thì có kết quả xét nghiệm dương tính với nCoV.</p>n<p>2 trường hợp cùng ngụ ở 175 Phúc Tân, Phúc Tân, Hoàn Kiếm là V.N.S. (nam, 29 tuổi) và N.T.N. (nữ, 24 tuổi). Họ đã được đưa đi cách ly tập trung tại Gia Lâm từ ngày 5/8 và có nhiều lần âm tính với virus. Tuy nhiên, lần lượt các ngày 19 và 21/8, họ xuất hiện các triệu chứng đau đầu, sốt và được xét nghiệm lại có kết quả dương tính.</p>n<p>N.T.T., nữ, 59 tuổi, ở đội 4, Ngọc Hồi, Thanh Trì. Người này là F1 và đã được cách ly tập trung trước đó.</p>n<p>Trường hợp cuối cùng là N.P.L., nữ, 34 tuổi, có địa chỉ tại Hòa Lương, Hà Hồi, Thường Tín. Chị L. từng tiếp xúc với F0, được cách ly từ ngày 9/8 và có kết quả xét nghiệm dương tính ngày 22/8.</p>n</div>n</section>n",
    "excerpt": "",
    "assigned": {
        "course": {
            "id": "1190",
            "title": "Course has assignment 2",
            "slug": "course-has-assignment-2",
            "content": "<p>Statu annum laus iracundia actionemque diligunt rationem enim praesidii restincta detractus particulas istic quaesita aristotele vi aiebat manilium suavis</p><p>Gerendarum disputatione utendum dignitatem prorsus ausus</p>",
            "author": "1"
        }
    },
    "retake_count": 2,
    "retaken": 0,
    "duration": {
        "format": "02 hours",
        "time": 7200
    },
    "introdution": "Tham khảo Google.com",
    "passing_grade": "6",
    "allow_file_type": "jpg,txt,zip,pdf,doc,docx,ppt",
    "files_amount": 2,
    "attachment": [],
    "results": {
        "status": "",
        "start_time": "2021-09-20T07:14:40",
        "expiration_time": "2021-09-20T09:14:40",
        "end_time": ""
    },
    "assignment_answer": [],
    "evaluation": []
}

 

27.Start Assignment


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/start/

POST

id

integer

Assignment ID

Respond

 

{
    "data": {
        "status": 200
    },
    "message": "Your Assignment has been started successfully."
}

 

28.Retake assignment


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/retake/

POST

id

integer

Assignment ID

Respond

{
    "data": {
        "status": 200
    },
    "message": "Your Assignment has been started successfully."
}

 

29.Save/Send Assignment


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/submit/
Content type: form-data

POST

action

string

save/send (Default: send)

id

integer

Assignement ID

note

string

Student note answer

file

array

File submit (multiple)

Respond

 
{
    "data": {
        "status": 200
    },
    "message": "What you did was sent to the instructors, please wait the evaluated result!"
}

 

30.Delete saved file


URL

METHOD

PARAM

Parameter

Type

Desciption

/wp-json/learnpress/v1/assignments/delete-submit-file/

POST

fileId

string

Id files to delete: ex: d0c69484fcf182d8e255d019fa5ee2d9

id

integer

Assignment ID

Respond

"{
  ""data"": {
    ""status"": 200
  },
  ""message"": ""Remove file successfully""
}"

 

31.API for Review

32.Get course review content


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/review/course/COURSE_ID

GET

page

integer

Current page of the collection. Default is "1"

per_page

integer

Maximum number of items to be returned in result set. Default: 5

Respond

"{
  ""status"": ""success"",
  ""message"": """",
  ""data"": {
    ""rated"": ""4.5"",
    ""total"": 2,
    ""items"": {
    },
    ""reviews"": {
      ""reviews"": [
        {
          ""user_email"": ""[email protected]"",
          ""display_name"": ""admin"",
          ""comment_id"": ""9"",
          ""title"": ""Review title"",
          ""content"": ""Review Content"",
          ""rate"": ""4""
        },
        {
          ""user_email"": ""[email protected]"",
          ""display_name"": ""student"",
          ""comment_id"": ""6"",
          ""title"": ""Review 2"",
          ""content"": ""Review 2 content"",
          ""rate"": ""5""
        }
      ],
      ""paged"": 1,
      ""total"": 2,
      ""per_page"": 5,
      ""finish"": true
    },
    ""can_review"": false
  }
}"

 

33.Submit Review


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/review/submit

POST

id

integer

Course ID

rate

integer

Your rate ( 1,2,3,4,5 )

title

string

Title rate

content

string

Content rate

Respond

"{
  ""status"": ""success"",
  ""message"": ""Your review submitted successfully"",
  ""data"": {
    ""comment_id"": 10
  }
}"


 

34.API for Wishlist

35.Get course to Wishlist


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/wishlist/course/COURSE_ID

GET

Respond

"{
  ""status"": ""success"",
  ""message"": ""This course not in your wishlist"",
  ""data"": {
    ""text"": {
      ""add"": ""Add to wishlist"",
      ""remove"": ""Remove from wishlist""
    },
    ""in_wishlist"": ""no"",
    ""items"": []
  }
}"

 

36.Add/Remove course to Wishlist


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/wishlist/toggle

POST

id

integer

Course ID

Respond

"{
  ""status"": ""success"",
  ""message"": ""This course has been added to your wishlists"",
  ""data"": {
    ""text"": {
      ""add"": ""Add to wishlist"",
      ""remove"": ""Remove from wishlist""
    },
    ""type"": ""add"",
    ""items"": [
      196
    ]
  }
}"

 

37.API for Reset password page


URL

METHOD

PARAM

Parameter

Type

Desciption

wp-json/learnpress/v1/users/reset-password

POST

user_login

username or email

Respond

{
    "code": "success",
    "message": "Please check your email to reset your password"
}