%s

', esc_html( apply_filters( 'learn-press/order/received-invalid-order-message', __( 'Invalid order.', 'learnpress' ) ) ) ); return; } echo wp_sprintf( '

%s

%s

', esc_html( apply_filters( 'learn-press/order/received-order-message', __( 'Thank you. Your order has been received.', 'learnpress' ) ) ), sprintf( __( 'Go to %1$s to continue browsing or go to %2$s', 'learnpress' ), sprintf( '%s', esc_url( learn_press_get_page_link( 'courses' ) ), esc_html__( 'Courses', 'learnpress' ) ), sprintf( '%s', esc_url( $lp_profile->get_tab_link( 'orders' ) ), esc_html__( 'My Orders', 'learnpress' ) ) ) ); do_action( 'learn-press/order/after-received-order-message', $order_received->get_id() ); ?> get_payment_method_title(); if ( $method_title ) : ?>
get_order_number() ); ?>
get_status(); echo ucfirst( $order_received::get_status_label( $status ) ); ?>
get_items(); $count = count( $items ); foreach ( $items as $item ) { if ( empty( $item['course_id'] ) || get_post_type( $item['course_id'] ) !== LP_COURSE_CPT ) { $links[] = apply_filters( 'learn-press/order-item-not-course-id', __( 'The course does not exist', 'learnpress' ), $item ); } else { $course_id = $item['course_id']; $courseModel = CourseModel::find( $course_id, true ); $button_course = ''; $userCourseModel = UserCourseModel::find( $user_id, $course_id, true ); if ( $userCourseModel && $userModel ) { // For enrolled or purchased course. $userCourseTemplate = UserCourseTemplate::instance(); $singleCourseTemplate = SingleCourseTemplate::instance(); // Load js button course. wp_enqueue_script( 'lp-single-course' ); if ( $userCourseModel->has_enrolled() ) { $button_course = $userCourseTemplate->html_btn_continue( $userCourseModel ); } elseif ( $userCourseModel->has_purchased() ) { $button_course = $singleCourseTemplate->html_btn_enroll_course( $courseModel, $userModel ); } } $link = sprintf( '%s (#%s) %s', get_the_permalink( $item['course_id'] ), get_the_title( $item['course_id'] ), $item['course_id'], $button_course ); if ( $count > 1 ) { $link = sprintf( '
  • %s
  • ', $link ); } $links[] = apply_filters( 'learn-press/order-received-item-link', $link, $item ); } } if ( $count > 1 ) { echo sprintf( '
      %s
    ', join( '', $links ) ); } elseif ( 1 == $count ) { echo implode( '', $links ); } else { echo esc_html__( '(No item)', 'learnpress' ); } ?>
    get_order_date() ) ) ); ?>
    get_formatted_order_total() ); ?>