In WooCommerce 3.3, the overall appearance of the backend orders list is improved, and added a new preview button to quickly see order details. But besides the preview button if you click elsewhere in the whole row it will redirect you to the order view link. To prevent this you can simply add extra no-link
in the post class for order screen.
There is a meta capability create_posts
that is not documented but is used by WordPress to check before inserting the various “Add New” buttons and links. In your custom post type declaration, add capabilities (not to be confused with cap) and then set it to do_not_allow
as in the below snippet. Additionally, to map meta capabilities for custom post types we can use map_meta_cap
hook as it’s explain here: http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types
In the below snippet we will be using “feedback” custom post type as an example.
For security reason WooCommerce sensitive checkout or account pages are rendered only on same origin iframes. But to load those pages on different origin iframes use the below snippet.
The new URL for the REST API endpoints contain the prefix as well as a namespace like this:
http://example.com/wp-json/wp/v2/posts/1
If you don’t like the default base prefix and want to change it from wp-json
to something more beautiful, the code snippet will help you to change the base prefix from wp-json
to api
.
As soon as you are done adding the above snippet, you have to flush rewrite rules by resaving permalinks from Settings > Permalinks
to access all the data from your new api like this:
http://example.com/api/wp/v2/posts/1
Want to learn about WP REST API? You can read the handbook here.