LLMS_Course::get_sales_page_url()

Get the URL to a WP Page or Custom URL when sales page redirection is enabled


Return Return

(string)


Top ↑

Source Source

File: includes/models/model.llms.course.php

				'posts_per_page' => 500,
			)
		);

		if ( 'ids' === $return ) {
			$r = wp_list_pluck( $q->posts, 'ID' );
		} elseif ( 'posts' === $return ) {
			$r = $q->posts;
		} else {
			$r = array();
			foreach ( $q->posts as $p ) {
				$r[] = new LLMS_Section( $p );
			}
		}

		return $r;

	}

	/**
	 * Retrieve the number of enrolled students in the course
	 *
	 * The cached value is calculated in the `LLMS_Processor_Course_Data` background processor.
	 *
	 * If, for whatever reason, it's not found, it will be calculated on demand and saved for later use.
	 *
	 * @since 3.15.0
	 * @since 4.12.0 Use cached value where possible.
	 * @since 6.0.0 Don't access `LLMS_Student_Query` properties directly.

Top ↑

Changelog Changelog

Changelog
Version Description
3.23.0 Unknown.
3.20.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.