fc_set_parsed_posted_data
Type: Filter
Filters the parsed checkout form data before it is stored.
Signature
apply_filters( 'fc_set_parsed_posted_data', $new_posted_data );
Parameters
| Name | Type | Description |
|---|---|---|
$new_posted_data | mixed | New posted data. |
Since
1.5.0
Source: inc/checkout-steps.php
Examples
add_filter( 'fc_set_parsed_posted_data',
/**
* Add prefix to order notes.
*
* @param mixed $new_posted_data New posted data.
* @return mixed Filtered value.
*/
function( $new_posted_data ) {
// Add prefix to order notes if present
if ( ! empty( $new_posted_data['order_comments'] ) ) {
$new_posted_data['order_comments'] = 'Customer note: ' . $new_posted_data['order_comments'];
}
return $new_posted_data;
},
10
);