Created
August 12, 2019 18:57
-
-
Save messica/07d5f9a171afbbed2c14cf38c46c2473 to your computer and use it in GitHub Desktop.
Fix for PMPro Proration Add On, Japanese Yen, and Stripe (make sure level costs are integers)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fix for PMPro Proration Add On, Japanese Yen, and Stripe | |
*/ | |
function my_pmpro_checkout_level( $level ) { | |
// Make sure level costs are always integers. | |
$level->initial_payment = intval( $level->initial_payment ); | |
$level->billing_amount = intval( $level->billing_amount ); | |
return $level; | |
} | |
add_filter( 'pmpro_checkout_level', 'my_pmpro_checkout_level', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment