WC_Data_Store_WP::filter_raw_meta_data()
Helper method to filter internal meta keys from all meta data rows for the object.
Method of the class: WC_Data_Store_WP{}
Hooks from the method
Return
Mixed|null
.
Usage
$WC_Data_Store_WP = new WC_Data_Store_WP(); $WC_Data_Store_WP->filter_raw_meta_data( $object, $raw_meta_data );
- $object(WC_Data) (required) (passed by reference — &)
- WC_Data object.
- $raw_meta_data(array) (required)
- Array of std object of meta data to be filtered.
Changelog
Since 4.7.0 | Introduced. |
WC_Data_Store_WP::filter_raw_meta_data() WC Data Store WP::filter raw meta data code WC 9.4.2
public function filter_raw_meta_data( &$object, $raw_meta_data ) { $this->internal_meta_keys = array_unique( array_merge( array_map( array( $this, 'prefix_key' ), $object->get_data_keys() ), $this->internal_meta_keys ) ); $meta_data = array_filter( $raw_meta_data, array( $this, 'exclude_internal_meta_keys' ) ); return apply_filters( "woocommerce_data_store_wp_{$this->meta_type}_read_meta", $meta_data, $object, $this ); }