Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created November 2, 2018 00:35
Show Gist options
  • Save ideadude/4fe6232580b9d844f78a9f8d440f6784 to your computer and use it in GitHub Desktop.
Save ideadude/4fe6232580b9d844f78a9f8d440f6784 to your computer and use it in GitHub Desktop.
Add a BTC currency to Paid Memberships Pro
/**
* Add a BTC currency to Paid Memberships Pro
* Add this code into a custom plugin. https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_btc_currency_format( $pmpro_currencies ) {
$pmpro_currencies['BTC'] = array(
'name' => __( 'Bitcoin', 'paid-memberships-pro' ),
'decimals' => '8',
'thousands_separator' => '',
'decimal_separator' => '.',
'symbol' => 'BTC',
'position' => 'left',
);
return $pmpro_currencies;
}
add_filter( 'pmpro_currencies', 'pmpro_btc_currency_format' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment