woocommerce_rest_(object_type)_schema
Usage
add_filter( 'woocommerce_rest_(object_type)_schema', 'wp_kama_woocommerce_rest_object_type_schema_filter' ); /** * Function for `woocommerce_rest_(object_type)_schema` filter-hook. * * @param $schema_properties * * @return */ function wp_kama_woocommerce_rest_object_type_schema_filter( $schema_properties ){ // filter... return $schema_properties; }
- $schema_properties
- -
Where the hook is called
woocommerce_rest_(object_type)_schema
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-controller.php 89
$schema['properties'] = apply_filters( 'woocommerce_rest_' . $object_type . '_schema', $schema['properties'] );