woocommerce/plugins/woocommerce-blocks/docs/examples/payment-gateways-features-l...

13 lines
338 B
Markdown
Raw Normal View History

```php
// The action callback function.
function my_function_callback( $features, $gateway ) {
if ( 'my-gateway' !== $gateway->id ) {
return $features;
}
$features[] = 'some-feature';
return $features;
}
add_filter( '__experimental_woocommerce_blocks_payment_gateway_features_list', 'my_function_callback', 10, 2 );
```