Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'mycred_sell_content_post_prefs', 'mycredpro_custom_sell_content_price' );
- function mycredpro_custom_sell_content_price( $sales_data ) {
- $user_id = get_current_user_id();
- $rank = mycred_get_users_rank( $user_id );
- // Gold rank gets 50% off on price
- if ( $rank == 'Gold' )
- $sales_data['price'] = $sales_data['price'] / 2;
- return $sales_data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement