ormatted source for the order origin.
*
* @since 8.5.0
*
* @param string $formatted_source The formatted source.
* @param string $source The source.
*/
$formatted_source = apply_filters(
'wc_order_attribution_origin_formatted_source',
ucfirst( trim( $source, '()' ) ),
$source
);
/**
* Filter the label for the order origin.
*
* This label should have a %s placeholder for the formatted source to be inserted
* via sprintf().
*
* @since 8.5.0
*
* @param string $label The label for the order origin.
* @param string $source_type The source type.
* @param string $source The source.
* @param string $formatted_source The formatted source.
*/
$label = (string) apply_filters(
'wc_order_attribution_origin_label',
$label,
$source_type,
$source,
$formatted_source
);
if ( false === strpos( $label, '%' ) ) {
return $formatted_source;
}
return sprintf( $label, $formatted_source );
}
/**
* Get the description for the order attribution field.
*
* @param string $field_name The field name.
*
* @return string
*/
private function get_field_description( string $field_name ): string {
/* translators: %s is the field name */
$description = sprintf( __( 'Order attribution field: %s', 'woocommerce' ), $field_name );
/**
* Filter the description for the order attribution field.
*
* @since 8.5.0
*
* @param string $description The description for the order attribution field.
* @param string $field_name The field name.
*/
return (string) apply_filters( 'wc_order_attribution_field_description', $description, $field_name );
}
}
Fatal error: Trait "Automattic\WooCommerce\Internal\Traits\OrderAttributionMeta" not found in /home/valigeria/public_html/wp-content/plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php on line 25