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( 'wc_epaybg_request_parameters', 'vanbodevelops_epaybg_add_order_number_to_description', 10, 4 ); | |
/** | |
* @param $epaybg_args | |
* @param $payment_type | |
* @param $order | |
* @param \WC_Gateway_Epaybg $gateway | |
* | |
* @return array | |
*/ | |
function vanbodevelops_epaybg_add_order_number_to_description( $epaybg_args, $payment_type, $order, $gateway ) { |
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
/** | |
* NOTE: Add to 'wp-content/themes/your-theme/functions.php' file | |
*/ | |
add_filter( 'pay360_hosted_cashier_get_parameters', 'vanbodevelops_pay360_always_register_account', 10, 3 ); | |
function vanbodevelops_pay360_always_register_account( $args, $order, $gateway ) { | |
if ( 0 < $order->get_customer_id() ) { | |
return $args; | |
} | |
$customer_id = $order->get_meta( 'wc_pay360_guest_customer_id', true ); |
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( 'wc_paytrace_protect_form_theme', 'vanbo_paytrace_protect_js_theme', 10, 3 ); | |
function vanbo_paytrace_protect_js_theme( $theme_styles, $map, $id ) { | |
return array( | |
'iframe' => array( | |
'background' => '', | |
'padding' => '', | |
'margin' => '', | |
), | |
'code' => array( | |
'font_color' => '#6d6d6d', |
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( 'wc_paysafe_token_transaction_parameters', 'vanbo_paysafe_token_request_params', 10, 4 ); | |
/** | |
* @param array $params | |
* @param \WC_Order $order | |
* @param $token | |
* @param string $type Possible values: interac, cards, directdebit | |
* | |
* @return array | |
*/ | |
function vanbo_paysafe_token_request_params( $params, $order, $token, $type ) { |
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
/** | |
* NOTE: Add to 'wp-content/themes/your-theme/functions.php' file | |
*/ | |
add_action( 'wc_paytrace_transaction_approved_response_processed', 'vanbodevelops_add_order_details', 10, 2 ); | |
/** | |
* @param \WcPaytrace\Abstracts\Response $response | |
* @param \WC_Order $order | |
*/ | |
function vanbodevelops_add_order_details( $response, $order ) { | |
try { |
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
/** | |
* IMPORTANT: The code should be added to the "child-theme/functions.php" file or anywhere that you know it will be loaded | |
*/ | |
function vd_paytrace_load_js() { | |
if ( ! class_exists( '\WcPaytrace\Helpers\Factories' ) ) { | |
return; | |
} | |
$pt_gateway = \WcPaytrace\Helpers\Factories::get_gateway( 'paytrace' ); |
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
/** | |
* IMPORTANT: Add to your 'wp-content/themes/theme-name/functions.php' file | |
*/ | |
add_filter( 'wc_paysafe_token_transaction_parameters', 'vanbodevelops_paysafe_modify_merchant_ref_number', 10, 4 ); | |
/** | |
* @param array $params The request parameters | |
* @param \WC_Order $order The WC order object | |
* @param string $token The payment token | |
* @param string $trans_type The transaction type: 'cards', 'directdebit' | |
* |
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
/** | |
* IMPORTANT: Add to your 'wp-content/themes/theme-name/functions.php' file | |
* | |
* Description: Will limit the trustcommerce requests per interval of time. | |
*/ | |
add_filter( 'wc_trustcommerce_process_single_payment_request', 'vanbodevelops_limit_transaction_requests', 9999, 3 ); | |
/** | |
* @param $request | |
* @param $order |
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_action( 'wc_paysafe_payment_response_processed', 'vanbodevelops_paysafe_add_order_details_after_payment', 10, 2 ); | |
/** | |
* IMPORTANT: Add the code to your 'child-theme/functions.php' file | |
* | |
* @param \WC_Order $order | |
* @param \WcPaysafe\Api\Response_Abstract $response | |
*/ | |
function vanbodevelops_paysafe_add_order_details_after_payment($order, $response) { | |
// If the transaction is successful | |
if ( 'completed' == strtolower( $response->get_status() ) ) { |
NewerOlder