Browse: Home / Functions /

learndash_get_group_price

learndash_get_group_price( int|WP_Post|null $group = null,  int $user_id )

Get group price


Description #

Return an array of price type, amount and cycle


Parameters #

$group

(int|WP_Post|null) (Optional) Group WP_Post object or post ID. Default to global $post.

Default value: null

$user_id

(int) (Required) User ID. Default to current user id.


Return #

(array) price details.


Source #

File: includes/payments/ld-payments-functions.php


Changelog #

Changelog
Version Description
4.5.0 Param $user_id is not nullable.
4.1.0 Optional $user_id param added.
3.2.0 Introduced.