The 'method' argument for register_rest_route() should be named 'methods'. Because of the typo, the argument is interpreted as it’s default value – 'GET' only.
Related Posts:
- How to check WordPress website username and password is correct
- WordPress REST API call generates nonce twice on every call
- How to: Rest endpoint returning empty object
- Custom endpoint that returns an xml
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- Rest Api How to get results of child categories with one api call
- WP rest api v2 posts filter by ‘search’ & ‘category_name’ not working
- What method to use to call a REST API?
- WP REST API V2 – Add user data to response
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- How to get results of subcategories also?(WP Rest Api v2)
- Amending REST API function without deactivate/activate plugin every time changes is made
- Create a new post using rest api and save featured image using an external image url
- Adding custom end points, No error line
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- Secure REST with nonce works only when not logged
- How to do POST request with WP REST API v2 to custom table?
- rest_no_route on custom API endpoint wordpress
- Can’t retrieve body params from PUT endpoint using formdata
- Do I need to create an endpoint?
- WordPress Rest API with rest_do_request, possible race condition?
- How to use apiFetch to get author information in Gutenberg properly?
- Mock a dependency of a WP_REST_Controller class
- update_callback is not working in register_rest_field
- REST Endpoint API 404
- Allow REST API Endpoint to specific user and hide from public
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- How to do admin ajax request in a plugin for rest api
- Attaching Image-file to userId
- Query String Filtering API
- Custom plugin & calling REST api of wordpress instance the plugins is running on
- GET request return value as error instead of success
- How to query a nested field in wordpress api using _fields param
- Get Custom taxonomy parent with wordpress REST API
- register_meta not showing custom post type metabox data in rest api
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Securing custom rest API endpoints with public access from PWA
- WP_Query not ordering correctly
- 403 error rest_’cookie_invalid_nonce’ on API Request
- Adding Amchart Interface to WordPress API
- WC REST API Error Handling
- Initializing rest endpoint issue
- Multisite and the JSON REST API: How to?
- React in plugins: REST endpoints vs. regular functions
- Query only title/field/featured media of posts [closed]
- WP API users per page
- Best place to keep files that are called by cron jobs?
- Is it safe to use PUT and DELETE requests
- Is it possible to make WordPress as a RESTful app?
- oneOf two possible objects in WP REST API?
- How to update WordPress Plugins in your own maintance application?
- Extend Plugin that creates an endpoint for GET request to also accepts POST requests
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Rest Api WordPress
- External api call using wordpress
- Does WP REST API cache internally executed (rest_do_request) requests?
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- REST API error in block editor for custom templates
- How to get locale within WP REST Request?
- Execute callback after REST API request completes + Response is sent
- How to boost WP custom post REST API GET queries by custom taxonomies
- How do I return XML to an API post request
- Best way to abort plugin in case of insufficient PHP version?
- Optimize shortcode callbacks
- Modifying the way WP sets cookies
- How to get vim to autocomplete WordPress API functions?
- How do I make specific plugin functionality apply to different sites in a network?
- What is a settings group actually for?
- The changes I make to an external JS file of my WP plugin are only applied after I clear my browser’s cache
- How to add multiple copies of a widget from “available widgets”
- How do I approach removing menu items on the fly based on settings in my plugin?
- Can I use core’s “or Link to Existing Content” feature in my plugin?
- Plugin with specific admin menu icon
- Should I always prefer esc_attr_e & esc_html_e instead of _e?
- Preview Changes button missing on custom post type page since updating to 3.4
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- $paged always 0 on plugin’s custom page
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- Video Security just like facebook [closed]
- WordPress debug messages not displaying
- Add a check box in Menu Settings
- Is there any way to fire heartbeat API from for website visitors?
- Displaying custom content from a plugin within the active theme
- Add variables from rewrite rules to query var
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- How do I specify where to save the debug.log?
- How to fetch the post content from the wordpress editor before it can be saved(published)?
- How does one set cookies in WordPress without getting the ‘headers not sent’ error? within WP
- Filter the_content() to add custom figure tags
- Glyphicons Dont Show in WordPress Plugin Only
- Change the search results header from plugin
- Add query string variables to all hyperlinks URL matching a specified domain
- Is there such a thing as a WordPress console?
- Build a dynamic block using the default attributes
- Show Admin Menu
- How to replace content of a block in and re-render on change?
- extending a core block doesn’t work inside the editor
- register_activation_hook doesn’t execute without add_action(‘init’,’some-function’)
- How to be GDPR compliant by loading plugins?
- Custom Plugin Breaks Other Plugin Functions