woocommerce_payment_gateway_get_new_payment_method_option_html
Filter the saved payment method option.
Использование
add_filter( 'woocommerce_payment_gateway_get_new_payment_method_option_html', 'wp_kama_woocommerce_payment_gateway_get_new_method_option_html_filter', 10, 2 );
/**
* Function for `woocommerce_payment_gateway_get_new_payment_method_option_html` filter-hook.
*
* @param string $html Option HTML.
* @param WC_Payment_Gateway $that Payment gateway instance.
*
* @return string
*/
function wp_kama_woocommerce_payment_gateway_get_new_method_option_html_filter( $html, $that ){
// filter...
return $html;
}
- $html(строка)
- Option HTML.
- $that(WC_Payment_Gateway)
- Payment gateway instance.
Список изменений
| С версии 2.6.0 | Введена. |
Где вызывается хук
woocommerce_payment_gateway_get_new_payment_method_option_html
woocommerce/includes/abstracts/abstract-wc-payment-gateway.php 643
return apply_filters( 'woocommerce_payment_gateway_get_new_payment_method_option_html', $html, $this );