Created
October 15, 2024 08:09
-
-
Save Preciousomonze/55ca0304e645f7404edcede86bdb74f2 to your computer and use it in GitHub Desktop.
Korapay gateway for WooCommerce Mini docu
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
if ( ! function_exists( 'WC_KORAPAY\\display_proper_error' ) ) { | |
/** | |
* Display messages properly. | |
* | |
* Incase of debugging | |
* | |
* @param array $response | |
* @param array $kora_params | |
* @param int $order_id | |
*/ | |
function display_proper_error( $response, $kora_params, $order_id ) { | |
if ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) { | |
$s = WC()->payment_gateways(); | |
var_dump( $response->error_data['korapay_api_failed']['data'], $kora_params ); | |
//var_dump($kora_params); | |
} | |
} | |
} | |
add_action( 'wc_korapay_redirect_payment_error', 'WC_KORAPAY\\display_proper_error', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment