Plugin Directory


Ignore:
Timestamp:
10/06/2026 11:07:46 AM (11 days ago)
Author:
themeum
Message:

Updated to 4.1.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tutor/trunk/classes/Course.php

    r3718715 r3730615  
    10051005                tutor_utils()->check_nonce();
    10061006
    1007                 $this->check_access();
     1007                $course_id = intval( wp_unslash( $_POST['ID'] ?? 0 ) );
     1008                $this->check_access( $course_id ); // Check user cap for the given id before processing.
    10081009
    10091010                $params = Input::sanitize_array(
    … …  
    16901691         */
    16911692        public function get_wc_products() {
     1693                tutor_utils()->checking_nonce();
     1694
    16921695                $exclude                 = array();
    16931696                $exclude_linked_products = Input::has( 'exclude_linked_products' );
    16941697                $course_id               = Input::post( 'course_id', 0, Input::TYPE_INT );
     1698
     1699                $this->check_access( $course_id );
    16951700
    16961701                if ( $exclude_linked_products ) {
    … …  
    17231728        public function get_wc_product() {
    17241729                tutor_utils()->checking_nonce();
     1730                $course_id  = Input::post( 'course_id', 0, Input::TYPE_INT );
     1731                $this->check_access( $course_id );
     1732
    17251733                $product_id = Input::post( 'product_id' );
    17261734                $product    = wc_get_product( $product_id );
    1727                 $course_id  = Input::post( 'course_id', 0, Input::TYPE_INT );
    17281735
    17291736                $is_linked_with_course = tutor_utils()->product_belongs_with_course( $product_id );
    … …  
    36433650
    36443651                if ( ! empty( $content_parent ) ) {
    3645                         foreach ( $content_parent as $topic ) {
    3646                                 $provided_topic_ids[]   = $topic['parent_topic_id'];
    3647                                 $provided_content_ids[] = $topic['content_id'];
    3648                         }
     3652                        $provided_topic_ids[]   = $content_parent['parent_topic_id'];
     3653                        $provided_content_ids[] = $content_parent['content_id'];                       
    36493654                }
    36503655
Note: See TracChangeset for help on using the changeset viewer.