$post ) { if ( '' !== $post['landing_page'] ) { // Get course by Title. $course = Astra_Site_Options_Import::instance()->get_page_by_title( $post['course'], 'sfwd-courses' ); // Get landing step by Title. $landing_page = Astra_Site_Options_Import::instance()->get_page_by_title( $post['landing_page'], 'cartflows_step' ); if ( is_object( $course ) && is_object( $landing_page ) ) { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Setting LearnDash - CartFlows Landing page - ' . $course->post_title . ' - ( ' . $course->ID . ' )' ); } $ld_meta = get_post_meta( $course->ID, '_sfwd-courses', true ); $ld_meta['sfwd-courses_wcf_course_template'] = $landing_page->ID; // Update the imported landing step to the course. update_post_meta( $course->ID, '_sfwd-courses', $ld_meta ); } } } } } /** * Set post types * * @since 1.3.13 * * @param array $post_types Post types. */ public function set_post_types( $post_types = array() ) { return array_merge( $post_types, array( 'sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-quiz', 'sfwd-certificates', 'sfwd-assignment' ) ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_SFWD_LMS::get_instance(); endif;