Created
February 9, 2022 15:20
-
-
Save ChromeOrange/e5950c3517516bd9a90362d4fbc906b8 to your computer and use it in GitHub Desktop.
add_filter( 'woocommerce_sagepay_direct_data', 'telephone_order_payment', 10, 2 );
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_filter( 'woocommerce_sagepay_direct_data', 'telephone_order_payment', 10, 2 ); | |
function telephone_order_payment( $data, $order ) { | |
$order_id = $order->get_id(); | |
$type = get_post_meta( $order_id, '_created_via', TRUE); | |
if ( $type !== 'checkout' ) { | |
$data['AccountType'] = 'M'; | |
} | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment