Created
November 2, 2018 00:35
-
-
Save ideadude/4fe6232580b9d844f78a9f8d440f6784 to your computer and use it in GitHub Desktop.
Add a BTC currency to Paid Memberships Pro
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
/** | |
* 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