Changeset 3149294
- Timestamp:
- 09/10/2024 02:04:05 PM (18 months ago)
- Location:
- auto-approve-product-reviews
- Files:
-
- 4 added
- 2 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/LICENSE (added)
-
tags/1.1.0/auto-approve-product-reviews.php (added)
-
tags/1.1.0/readme.txt (added)
-
trunk/auto-approve-product-reviews.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
auto-approve-product-reviews/trunk/auto-approve-product-reviews.php
r2306739 r3149294 2 2 /* 3 3 Plugin Name: Auto Approve Product Reviews 4 Plugin URI: https://layered.market/plugins/auto-approve-product-reviews 5 Description: Auto approve product reviews with a minimum rating chosen by you 6 Version: 1.0.0 4 Plugin URI: https://layered.store/plugins/auto-approve-product-reviews 5 Requires Plugins: woocommerce 6 Description: Auto-approve WooCommerce product reviews with a minimum rating chosen by you 7 Version: 1.1.0 7 8 Author: Layered 8 Author URI: https://layered. market9 Author URI: https://layered.store 9 10 License: GPL-3.0-or-later 10 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html 11 12 */ 12 13 //require plugin_dir_path(__FILE__) . 'vendor/autoload.php';14 15 13 16 14 class LayeredAutoApproveReviews { … … 70 68 71 69 public function checkReview($approved, $commentdata) { 72 $ unapprovedReview = $commentdata['comment_type'] === 'review' && $approved == 0;70 $isUnapprovedReview = $commentdata['comment_type'] === 'review' && $approved == 0; 73 71 74 if ($ unapprovedReview && isset($_POST['rating']) && ($minRating = get_option('woocommerce_reviews_auto_approve_rating')) && $_POST['rating'] >= $minRating) {72 if ($isUnapprovedReview && isset($_POST['rating']) && ($minRating = get_option('woocommerce_reviews_auto_approve_rating')) && $_POST['rating'] >= $minRating) { 75 73 $approved = 1; 76 74 } … … 91 89 } 92 90 93 94 91 // Run the plugin 95 96 92 add_action('plugins_loaded', 'LayeredAutoApproveReviews::start'); 97 93 register_activation_hook(__FILE__, 'LayeredAutoApproveReviews::onActivation'); -
auto-approve-product-reviews/trunk/readme.txt
r2306739 r3149294 2 2 Contributors: andreiigna 3 3 Tags: woocommerce, shop, products, reviews 4 Requires at least: 5 5 Tested up to: 5.4 4 Tested up to: 6.6 5 Requires at least: 6 6 6 Requires PHP: 5.6 7 Stable tag: trunk7 Stable tag: 1.1.0 8 8 License: GPL-3.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 10 11 Auto approve product reviews with a minimum rating chosen by you11 Auto-approve product reviews with a minimum rating chosen by you 12 12 13 13 == Description == 14 14 15 This is the plugin to use if your store gets so many reviewsyou don't have time to review them all!15 This is the plugin to use if your WooCommerce store gets so many reviews that you don't have time to review them all! 16 16 17 The plugin automatically approves reviews with 5 ⭐️, and ishas options to change the minimum rating that can be auto-approved.17 The plugin automatically approves 5 ⭐️ reviews, and has options to change the minimum rating that can be auto-approved. 18 18 19 If the review is marked as spam by Akismet or another spam checking tool, the review will not be automatically approved. Will stay in queue for manual checking. 19 If the review is marked as spam by Akismet or another spam checking tool, the review will not be automatically approved. It will stay in queue for manual checking. 20 21 Perfect for any WooCommerce shop/store 20 22 21 23 == Screenshots == … … 26 28 == Changelog == 27 29 30 = 1.1 - 10 Sep 2024 = 31 * Improved compatibility with latest WordPress version 32 28 33 = 1.0 - 17 May 2020 = 29 34 * First release. Auto approves WooCommerce product reviews
Note: See TracChangeset
for help on using the changeset viewer.