Add button linked to single product page on order detail page

The woocommerce_order_details_after_order_table hook receives the WC_Order object as the $order argument. This means you can get the items from the order with $order->get_items(). That will return an Array of WC_Order_Items. From this you can get the associated product of the first item, which you can use to get its permalink, to which you can append … Read more

WordPress product review

First you would create a custom post type “products”, you can use Custom Post Type UI for this. You can also do it by hand. Then you would create custom fields for the products, you can use the excellent ACF for this. Here’s some resources from the WordPress codex.

WooCommerce Review Author Hook on Review Submission

Found it! Go to wp-includes > comment-templates.php. Edit around line 2560: else ( ! is_user_logged_in() ) { to else { Then in my plugin .php file or your Theme ‘function.php’, add: function modify_author($commentdata) { $commentdata[‘comment_author’] = $_POST[‘author’]; // You should sanitize this. return $commentdata; } add_filter(‘preprocess_comment’, ‘modify_author’); I know it’s bad idea to modify comment-templates.php, … Read more

Limit review by e-mail

This question should really be directed to the Woocommerce support but it doesn’t really sound like Woocommerce is the right solution here. Create a plugin and in the plugin, create a custom post type called companies. Using something like https://generatewp.com/post-type/ will help you get started quickly. Then you want to look at implementing your own … Read more

Separate blog and reviews categories

Sounds like you’re sharing the default category taxonomy for both of your post types. When you want separate categories per post type, you would need to create a custom taxonomy for your review posts. Please check out the register_taxonomy function in the WordPress developers documentation. https://developer.wordpress.org/reference/functions/register_taxonomy/ See below an example of a custom taxonomy. add_action( … Read more

Users moderate own comments

http://wordpress.org/extend/plugins/role-scoper/ This plugin is great for fine tuned control of content. I have not, however, tried what you are requesting. So I can only suggest it as something to look into…. I’m not sure if it gives such fine tuned control over comments….

Preview page/post revisions without overwriting current content

WordPress has built in Revision Management. You can set the saved revisions to a custom number in the wp-config.php file in your installation. define( ‘WP_POST_REVISIONS’, 30 ); NOTE: You should be aware of the »autosave« mechanism, which also sets post revisions. So leaving a tab open for 1 hour with a Post Revision interval of … Read more