Sell Content Expiration Time
-
Hey Guys, thanks for your time.
I’m using the latest version of wordpress, buddypress, bbpress and mycred.
I’m using the sell content add-on to sell acccess to a certain page on my site. I want it to expire really quickly so I found this code on the forum to translate the expiration from hours to seconds.
Here’s the code:
add_filter( ‘mycred_sell_exp_title’, ‘adjust_mycred_exp_title’ );
function adjust_mycred_exp_title( $title ) {
return ‘Seconds’;
}add_filter( ‘mycred_sell_expire_calc’, ‘adjust_mycred_exp_fomula’, 10, 4 );
function adjust_mycred_exp_fomula( $result, $length, $user_id, $post_id ) {
return abs( $length * 60 );
}However, it’s not working.
I’ve installed it into my child theme. Is that the right spot? Should I install it into the plugin itself?Is the code right?
Any insight would be greatly appreciated.
Thanks for your time 🙂
The topic ‘Sell Content Expiration Time’ is closed to new replies.