Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Customize Sell Content Prices
- * @mycred
- * @version 1.0
- */
- add_filter( 'mycred_get_content_price', 'mycred_pro_custom_content_price', 10, 4 );
- function mycred_pro_custom_content_price( $price, $post_id, $point_type, $user_id ) {
- // If the user is an author
- if ( user_can( $user_id, 'edit_published_posts' ) ) {
- // Get our custom price that we stored as a custom post meta
- $custom_price = get_post_meta( $post_id, 'custom_price', true );
- if ( $custom_price != '' )
- $price = $custom_price;
- }
- return $price;
- }
Add Comment
Please, Sign In to add comment