woocommerce_payulatam_supported_currencies
Check if current currency is valid for PayU Latam.
Description
Parameters (1)
- 0. $array (callback) =>
array( 'CLP', 'ARS', 'BRL', 'COP', 'MXN', 'PEN', 'USD' )
- The array.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'woocommerce_payulatam_supported_currencies', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the woocommerce_payulatam_supported_currencies callback
- function filter_woocommerce_payulatam_supported_currencies( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'woocommerce_payulatam_supported_currencies', 'filter_woocommerce_payulatam_supported_currencies', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'woocommerce_payulatam_supported_currencies', 'filter_woocommerce_payulatam_supported_currencies', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /woocommerce-gateway-payulatam.php
- if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_payulatam_supported_currencies', array( 'CLP', 'ARS', 'BRL', 'COP', 'MXN', 'PEN', 'USD' ) ) ) ) return false;