wc_order_attribution_tracking_fields
Filter the fields to show in the source data metabox.
Usage
add_filter( 'wc_order_attribution_tracking_fields', 'wp_kama_wc_order_attribution_tracking_fields_filter' ); /** * Function for `wc_order_attribution_tracking_fields` filter-hook. * * @param string[] $fields The fields to show. * * @return string[] */ function wp_kama_wc_order_attribution_tracking_fields_filter( $fields ){ // filter... return $fields; }
- $fields(string[])
- The fields to show.
Changelog
Since 8.5.0 | Introduced. |
Where the hook is called
wc_order_attribution_tracking_fields
woocommerce/src/Internal/Traits/OrderAttributionMeta.php 96
$this->fields = (array) apply_filters( 'wc_order_attribution_tracking_fields', $this->default_fields );