Plugin Directory

Changeset 3455003


Ignore:
Timestamp:
02/05/2026 10:31:16 PM (7 weeks ago)
Author:
ivole
Message:

5.99.1

Location:
customer-reviews-woocommerce
Files:
870 added
6 edited

Legend:

Unmodified
Added
Removed
  • customer-reviews-woocommerce/trunk/class-ivole.php

    r3451657 r3455003  
    8585
    8686class Ivole {
    87     const CR_VERSION = '5.99.0';
     87    const CR_VERSION = '5.99.1';
    8888
    8989    public function __construct() {
  • customer-reviews-woocommerce/trunk/includes/qna/class-cr-qna.php

    r3396824 r3455003  
    964964
    965965        public function clear_qna_cache( $comment_id ) {
    966             if (
    967                 $comment_id &&
    968                 'cr_qna' === get_comment_type( $comment_id )
    969             ) {
     966            if ( $comment_id ) {
    970967                $cache_key = 'cr_qna_answered_' . intval( $comment_id );
    971968                wp_cache_delete( $cache_key, 'cr_qna' );
  • customer-reviews-woocommerce/trunk/includes/reviews/class-cr-endpoint.php

    r3446777 r3455003  
    314314                                                $media_meta[] = array(
    315315                                                    'meta' => CR_Reviews::REVIEWS_META_LCL_IMG,
    316                                                     'value' => esc_url_raw( $body2->order->items[$i]->media[$m] )
     316                                                    'value' => intval( $body2->order->items[$i]->media[$m] )
    317317                                                );
    318318                                            }
     
    321321                                                $media_meta[] = array(
    322322                                                    'meta' => CR_Reviews::REVIEWS_META_LCL_VID,
    323                                                     'value' => esc_url_raw( $body2->order->items[$i]->media[$m] )
     323                                                    'value' => intval( $body2->order->items[$i]->media[$m] )
    324324                                                );
    325325                                            }
  • customer-reviews-woocommerce/trunk/includes/reviews/class-cr-reviews.php

    r3451657 r3455003  
    126126            // a filter for voting buttons on customer uploaded media pop-up
    127127            add_filter( 'cr_reviews_media_voting', array( $this, 'display_media_voting' ), 10, 2 );
     128            add_action( 'delete_comment', array( $this, 'delete_review_media_attachments' ), 10, 2 );
    128129        }
    129130        public function custom_fields_attachment( $comment_form ) {
     
    18581859        return (bool) $verified;
    18591860    }
     1861
     1862    public function delete_review_media_attachments( $comment_id, $comment ) {
     1863        $meta_keys = array(
     1864            self::REVIEWS_META_LCL_IMG,
     1865            self::REVIEWS_META_LCL_VID,
     1866        );
     1867        foreach ( $meta_keys as $meta_key ) {
     1868            $meta_values = get_comment_meta( $comment_id, $meta_key, false );
     1869
     1870            if ( empty( $meta_values ) ) {
     1871                continue;
     1872            }
     1873
     1874            foreach ( $meta_values as $attachment_id ) {
     1875
     1876                $attachment_id = absint( $attachment_id );
     1877                if ( ! $attachment_id ) {
     1878                    continue;
     1879                }
     1880
     1881                // Make sure the attachment exists and is a media item
     1882                if ( 'attachment' === get_post_type( $attachment_id ) ) {
     1883                    wp_delete_attachment( $attachment_id, true );
     1884                }
     1885            }
     1886        }
     1887    }
    18601888}
    18611889
  • customer-reviews-woocommerce/trunk/ivole.php

    r3451657 r3455003  
    44Description: Customer Reviews for WooCommerce plugin helps you get more customer reviews for your shop by sending automated reminders and coupons.
    55Plugin URI: https://wordpress.org/plugins/customer-reviews-woocommerce/
    6 Version: 5.99.0
     6Version: 5.99.1
    77Author: CusRev
    88Author URI: https://www.cusrev.com/business/
  • customer-reviews-woocommerce/trunk/readme.txt

    r3451657 r3455003  
    55Tested up to: 6.9
    66Requires PHP: 7.2
    7 Stable tag: 5.99.0
     7Stable tag: 5.99.1
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl.html
     
    235235== Changelog ==
    236236
     237= 5.99.1 =
     238* Improvement: media files attached to a review are automatically removed when the review is deleted
     239* Bug fix: media files uploaded to local aggregated review forms not linked to reviews correctly
    237240= 5.99.0 =
    238241* New feature: display of product recommendation statistics on the Reviews page in WordPress admin console
Note: See TracChangeset for help on using the changeset viewer.