Woocommerce – WooCoommerce custom endpoint – Enable auth protection
I have defined the following custom endpoint for woocommerce: add_action( 'rest_api_init', 'custom_endpoint' ); function custom_endpoint() { register_rest_route( 'wc/v3', 'my_custom_endpoint', array( 'methods' => 'GET', 'callback' => 'return_value', ) ); } function return_value() { return "this is my custom endpoint!"; } However,…