WooCommerce::dozent_course_gate( $course )
When user click Take this course button from course single page.
Description
make sure user will be redirect to WooCommerce product landing page.
Parameters
- $course
-
(Required)
Source
File: classes/WooCommerce.php
public function dozent_course_gate( $course ) { $course = dozent_get_course( $course ); $attached_product_type = dozent_attached_product_type_to_course( $course ); if ( $attached_product_type === 'WooCommerce' ) { $product_id = dozent_get_attached_product_id_by_course( $course->get_id() ); dozent_redirect( get_the_permalink( $product_id ) ); } }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |