WordPress.org

Ready to get started?Download WordPress

Forums

Paid Memberships Pro
Quick hack for Canadian dollars in Stripe (6 posts)

  1. Ken Dirschl
    Member
    Posted 1 year ago #

    Stripe beta is now available in Canada. PMPro only allows USA dollar for Stripe, but a quick hack can access Paypal's dropdown list to choose CDN dollars instead.

    Open file 'paymentsettings.php' in directory 'adminpages' and alter lines #230 and #240:

    #230:

    <tr class="gateway gateway_stripe gateway_authorizenet" <?php if($gateway != "authorizenet" /* && $gateway != "stripe" */) { ?>style="display: none;"<?php } ?>>

    #240:

    <tr class="gateway gateway_ gateway_paypal gateway_paypalexpress" <?php if(!empty($gateway) && $gateway != "paypal" && $gateway != "paypalexpress" && $gateway != "stripe") { ?>style="display: none;"<?php } ?>>

    Comment out (or remove) $gateway != "stripe" on line #230 and add && $gateway != "stripe" on line #240.

    Quick and dirty but works until this gets revised.

    http://wordpress.org/extend/plugins/paid-memberships-pro/

  2. bradyshearer
    Member
    Posted 1 year ago #

    I was really excited about this fix.

    I tried it however and when you save your settings now matter what the currency always reverts to USD.

    And when trying to make a payment on my website with PMPro and Stripe I still get the error:

    Error: Invalid currency: usd

    Sad times.

  3. Ken Dirschl
    Member
    Posted 1 year ago #

    You're right Brady; you also have to make a change around line 32 where fixed currency is set:

    if($_POST['gateway'] == "authorizenet" || $_POST['gateway'] == "stripe")
    pmpro_setOption("currency", $currency_fixed);
    else
    pmpro_setOption("currency", $currency_paypal);

    just remove the || $_POST['gateway'] == "stripe" or comment it out, that way the program will use the paypal currency options. Sorry, I forgot that line.

  4. bradyshearer
    Member
    Posted 1 year ago #

    Sounds awesome!

    I also contacted PMPro yesterday and they've made an update now to the plugin to fix it so that's awesome too! :)

  5. strangerstudios
    Member
    Plugin Author

    Posted 1 year ago #

    FYI, that update is available in the current dev release:
    http://github.com/strangerstudios/paid-memberships-pro/tree/dev

    ... and will be in the 1.5.3 release version.

  6. Ken Dirschl
    Member
    Posted 1 year ago #

    Great! I'll go get it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic