mycred_get_content_price

Description

This filter allows you to adjust the price of a content that has been set for sale using the Sell Content add-on. If you are looking to customize who needs to pay for the content, consider using the mycred_user_has_paid_for_content filter instead.

Available since version 1.7

Parameters

Param Type Required Description
$price int or float Yes

The price in points.

$post_id int No

The post object ID.

$point_type string No

The point type that the price is requested for.

$user_id int No

The numeric ID of the user who needs to pay for this content.

Used By

Package Prio. Description
mycred/content 10 Used by the Sell Content add-on.

Examples

Example 1: Set a custom price for post authors as they view other authors content, with an override option using custom post meta.

Example 2: Example of how the filter can be used to set custom prices based on post type or taxonomy relationships.