dozent_attached_product_type_to_course( null $course = null )
Check course attached product type
Description
With this product, course will be sell. It could be WooCommerce, EDD and any others integration
See also
Parameters
- $course
-
(null) (Optional) Course Object|ID
Default value: null
Return
(mixed|void|null)
Source
File: includes/course-functions.php
function dozent_attached_product_type_to_course( $course = null ) { if ( ! $course ) { return null; } $course = dozent_get_course( $course ); $product_id = dozent_get_attached_product_id_by_course( $course->get_id() ); $product_type = false; if ( $course->is_closed() && $product_id ) { $product_type = get_post_meta( $course->get_id(),'_product_by', true ); //Check rest of other integration } return apply_filters( 'dozent_attached_product_type_to_course', $product_type, $course ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |