Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save messica/07d5f9a171afbbed2c14cf38c46c2473 to your computer and use it in GitHub Desktop.
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)
<?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