wc_order_attribution_origin_formatted_source
Filter the formatted source for the order origin.
Usage
add_filter( 'wc_order_attribution_origin_formatted_source', 'wp_kama_wc_order_attribution_origin_formatted_source_filter', 10, 2 ); /** * Function for `wc_order_attribution_origin_formatted_source` filter-hook. * * @param string $formatted_source The formatted source. * @param string $source The source. * * @return string */ function wp_kama_wc_order_attribution_origin_formatted_source_filter( $formatted_source, $source ){ // filter... return $formatted_source; }
- $formatted_source(string)
- The formatted source.
- $source(string)
- The source.
Changelog
Since 8.5.0 | Introduced. |
Where the hook is called
wc_order_attribution_origin_formatted_source
woocommerce/src/Internal/Traits/OrderAttributionMeta.php 332-336
$formatted_source = apply_filters( 'wc_order_attribution_origin_formatted_source', ucfirst( trim( $source, '()' ) ), $source );