Plugin Directory

Changeset 3149294


Ignore:
Timestamp:
09/10/2024 02:04:05 PM (18 months ago)
Author:
andrei.igna
Message:

v1.1 - texts & wp compat

Location:
auto-approve-product-reviews
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • auto-approve-product-reviews/trunk/auto-approve-product-reviews.php

    r2306739 r3149294  
    22/*
    33Plugin 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
     4Plugin URI: https://layered.store/plugins/auto-approve-product-reviews
     5Requires Plugins: woocommerce
     6Description: Auto-approve WooCommerce product reviews with a minimum rating chosen by you
     7Version: 1.1.0
    78Author: Layered
    8 Author URI: https://layered.market
     9Author URI: https://layered.store
    910License: GPL-3.0-or-later
    1011License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1112*/
    12 
    13 //require plugin_dir_path(__FILE__) . 'vendor/autoload.php';
    14 
    1513
    1614class LayeredAutoApproveReviews {
     
    7068
    7169    public function checkReview($approved, $commentdata) {
    72         $unapprovedReview = $commentdata['comment_type'] === 'review' && $approved == 0;
     70        $isUnapprovedReview = $commentdata['comment_type'] === 'review' && $approved == 0;
    7371
    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) {
    7573            $approved = 1;
    7674        }
     
    9189}
    9290
    93 
    9491// Run the plugin
    95 
    9692add_action('plugins_loaded', 'LayeredAutoApproveReviews::start');
    9793register_activation_hook(__FILE__, 'LayeredAutoApproveReviews::onActivation');
  • auto-approve-product-reviews/trunk/readme.txt

    r2306739 r3149294  
    22Contributors: andreiigna
    33Tags: woocommerce, shop, products, reviews
    4 Requires at least: 5
    5 Tested up to: 5.4
     4Tested up to: 6.6
     5Requires at least: 6
    66Requires PHP: 5.6
    7 Stable tag: trunk
     7Stable tag: 1.1.0
    88License: GPL-3.0-or-later
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Auto approve product reviews with a minimum rating chosen by you
     11Auto-approve product reviews with a minimum rating chosen by you
    1212
    1313== Description ==
    1414
    15 This is the plugin to use if your store gets so many reviews you don't have time to review them all!
     15This is the plugin to use if your WooCommerce store gets so many reviews that you don't have time to review them all!
    1616
    17 The plugin automatically approves reviews with 5 ⭐️, and is has options to change the minimum rating that can be auto-approved.
     17The plugin automatically approves 5 ⭐️ reviews, and has options to change the minimum rating that can be auto-approved.
    1818
    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.
     19If 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
     21Perfect for any WooCommerce shop/store
    2022
    2123== Screenshots ==
     
    2628== Changelog ==
    2729
     30= 1.1 - 10 Sep 2024 =
     31* Improved compatibility with latest WordPress version
     32
    2833= 1.0 - 17 May 2020 =
    2934* First release. Auto approves WooCommerce product reviews
Note: See TracChangeset for help on using the changeset viewer.