Created
August 3, 2020 20:22
-
-
Save dparker1005/75e31af84603d4b04e1e88ad05fa8d39 to your computer and use it in GitHub Desktop.
Fix PMPro Payfast showing SSL error in admin menus when set up correctly.
This file contains 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 | |
// Copy from below here... | |
/* | |
* Fix PMPro Payfast showing SSL error in admin menus | |
* when set up correctly. | |
*/ | |
function my_pmpro_payfast_fix_warning( $pmpro_is_ready ) { | |
global $pmpro_gateway_ready, $pmpro_pages_ready; | |
if ( empty($pmpro_gateway_ready) && 'payfast' === pmpro_getOption( 'gateway' ) ) { | |
if( pmpro_getOption( 'payfast_merchant_id' ) && pmpro_getOption( 'payfast_merchant_key' ) && pmpro_getOption( 'payfast_passphrase' ) ) { | |
$pmpro_gateway_ready = true; | |
} | |
} | |
return ( $pmpro_gateway_ready && $pmpro_pages_ready ); | |
} | |
add_filter( 'pmpro_is_ready', 'my_pmpro_payfast_fix_warning' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment