Created
February 7, 2023 07:55
-
-
Save xlplugins/f51b8eff1ab6cd288413f4ec3bd6d449 to your computer and use it in GitHub Desktop.
Unset Payment gatewy for specific checkout page- for client
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
<?php | |
class WFACP_TEMP_001 { | |
public function __construct() { | |
add_action( 'wfacp_before_process_checkout_template_loader', [ $this, 'actions' ] ); | |
} | |
public function actions() { | |
add_filter( 'woocommerce_available_payment_gateways', [ $this, 'unset_payment_gatway' ] ); | |
} | |
public function unset_payment_gatway( $gateways ) { | |
$wfacp_id = WFACP_Common::get_id(); | |
if ( $wfacp_id == 71977) { | |
unset( $gateways['ppec_paypal'] ); | |
} | |
return $gateways; | |
} | |
} | |
new WFACP_TEMP_001(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment