apply_filters( 'woocommerce_rest_private_query_vars', array $private_query_vars )

Filter the allowed ‘private’ query vars for authorized users.


Description Description

If the user has the edit_posts capability, we also allow use of private query parameters, which are only undesirable on the frontend, but are safe for use in query strings.

To disable anyway, use add_filter( 'woocommerce_rest_private_query_vars', '__return_empty_array' );


Parameters Parameters

$private_query_vars

Array of allowed query vars for authorized users. }


Top ↑

Source Source

File: includes/rest-api/Controllers/Version3/class-wc-rest-posts-controller.php



Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.