Rewrite API For WordPress
Use Rewrite API Method for Ajax Request in WordPress
by Mehrshad Darzi · github.com/mehrshaddarzi/wp-rewrite-api · website
★ 3stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mehrshaddarzi/wp-rewrite-api/archive/refs/heads/master.zipFrom the readme
WordPress Rewrite API Ajax
Use Rewrite API Method for Ajax Request in WordPress.
Rewrite API in WordPress is Very Faster than admin-ajax.php.
How to Install and Use
Activate this plugin, then Flush Rewrite in WordPress.
How to Create New Route
use WordPressRewriteAPIRequest namespace in your class.
And use rewriteapi variable in js:
Create Flexible Methods
We want to create a function to add to cart in WooCommerce:
1) Create PHP Class
2) Create Js File (wc-cart.js)
3) Use in Every Project according to FrontEnd
How to Change Prefix api Url
use addfilter('rewriteapirequestprefixurl', 'api'); in WordPress, then flush rewrite;
How to Get My Custom Url in Template function
How To Disable Load Custom UI Component
For Disable Custom Ui Component, see ui-component.php and use every filter. for example: