Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'edd_format_amount_decimals', 'kjm_format_decimals' );
- function kjm_format_decimals() {
- return 0;
- }
- add_filter( 'edd_purchase_link_args', 'kjm_adjust_purchase_link_text' );
- function kjm_adjust_purchase_link_text( $args ) {
- $download = new EDD_Download( $args['download_id'] );
- $option = edd_get_option( 'add_to_cart_text' );
- $price = edd_currency_filter( edd_format_amount( $download->price ) );
- if ( ! $download->is_free( $args['price_id'] ) && ! $download->has_variable_prices() ) {
- $args['text'] = $option . ' for ' . $price;
- }
- return $args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement