mycred_get_content_sales_count
Description
This function returns the total number of times a particular posts content has been purchased.
This function is only available if the Sell Content add-on is enabled.
Available since version 1.7
Returns
(int) The total number of logged transactions.
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function mycred_get_content_sales_count( |
||||
$post_id |
int | Yes | The post object ID. |
|
) { ... } |
Examples
Example 1: Get the current posts total buyers count.
global $post; printf( 'This post has been purchased %d times.', mycred_get_content_sales_count( $post->ID ) );