Plugin Directory

Changeset 3437300


Ignore:
Timestamp:
01/12/2026 12:47:23 AM (2 months ago)
Author:
ivole
Message:

5.96.0

Location:
customer-reviews-woocommerce
Files:
875 added
9 edited

Legend:

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

    r3434533 r3437300  
    8585
    8686class Ivole {
    87     const CR_VERSION = '5.95.0';
     87    const CR_VERSION = '5.96.0';
    8888
    8989    public function __construct() {
  • customer-reviews-woocommerce/trunk/includes/google/class-cr-google-shopping-prod-feed.php

    r3389261 r3437300  
    430430            }
    431431
     432            // <condition>
     433            if ( $review->condition ) {
     434                $xml_writer->startElement( 'g:condition' );
     435                $xml_writer->text( $review->condition );
     436                $xml_writer->endElement();
     437            }
     438
    432439            do_action( 'cr_gs_product_feed_xml_elements', $xml_writer, $review );
    433440
     
    479486            'multipack' => '',
    480487            'size' => '',
    481             'bundle' => ''
     488            'bundle' => '',
     489            'condition' => ''
    482490        ) );
    483491
     
    727735            if( is_array( $attributes ) && isset( $attributes['bundle'] ) ) {
    728736                $_product->bundle = self::get_field( $attributes['bundle'], $product );
     737            }
     738            $_product->condition = '';
     739            if( is_array( $attributes ) && isset( $attributes['condition'] ) ) {
     740                $_product->condition = self::get_field( $attributes['condition'], $product );
    729741            }
    730742            $_product->identifier_exists = self::get_field( 'meta__cr_identifier_exists', $product );
  • customer-reviews-woocommerce/trunk/includes/google/class-cr-product-feed-attributes.php

    r3267586 r3437300  
    5454                    $product_fields['age_group'] = $_POST['cr_google_attribute_age_group'];
    5555                }
    56                 if( isset( $_POST['cr_google_attribute_color'] ) ) {
     56                if ( isset( $_POST['cr_google_attribute_color'] ) ) {
    5757                    $product_fields['color'] = $_POST['cr_google_attribute_color'];
    5858                }
    59                 if( isset( $_POST['cr_google_attribute_gender'] ) ) {
     59                if ( isset( $_POST['cr_google_attribute_gender'] ) ) {
    6060                    $product_fields['gender'] = $_POST['cr_google_attribute_gender'];
    6161                }
    62                 if( isset( $_POST['cr_google_attribute_material'] ) ) {
     62                if ( isset( $_POST['cr_google_attribute_material'] ) ) {
    6363                    $product_fields['material'] = $_POST['cr_google_attribute_material'];
    6464                }
    65                 if( isset( $_POST['cr_google_attribute_multipack'] ) ) {
     65                if ( isset( $_POST['cr_google_attribute_multipack'] ) ) {
    6666                    $product_fields['multipack'] = $_POST['cr_google_attribute_multipack'];
    6767                }
    68                 if( isset( $_POST['cr_google_attribute_size'] ) ) {
     68                if ( isset( $_POST['cr_google_attribute_size'] ) ) {
    6969                    $product_fields['size'] = $_POST['cr_google_attribute_size'];
    7070                }
    71                 if( isset( $_POST['cr_google_attribute_bundle'] ) ) {
     71                if ( isset( $_POST['cr_google_attribute_bundle'] ) ) {
    7272                    $product_fields['bundle'] = $_POST['cr_google_attribute_bundle'];
    7373                }
    74                 if( isset( $_POST['cr_google_attribute_unit'] ) ) {
     74                if ( isset( $_POST['cr_google_attribute_unit'] ) ) {
    7575                    $product_fields['unit'] = $_POST['cr_google_attribute_unit'];
    7676                }
    77                 if( isset( $_POST['cr_google_attribute_unit_pricing_measure'] ) ) {
     77                if ( isset( $_POST['cr_google_attribute_unit_pricing_measure'] ) ) {
    7878                    $product_fields['unit_pricing_measure'] = $_POST['cr_google_attribute_unit_pricing_measure'];
    7979                }
    80                 if( isset( $_POST['cr_google_attribute_unit_pricing_base_measure'] ) ) {
     80                if ( isset( $_POST['cr_google_attribute_unit_pricing_base_measure'] ) ) {
    8181                    $product_fields['unit_pricing_base_measure'] = $_POST['cr_google_attribute_unit_pricing_base_measure'];
     82                }
     83                if ( isset( $_POST['cr_google_attribute_condition'] ) ) {
     84                    $product_fields['condition'] = $_POST['cr_google_attribute_condition'];
    8285                }
    8386            }
     
    128131                    'title'    => __( 'Multipack', 'customer-reviews-woocommerce' ),
    129132                    'desc'     => __( 'Add a multipack attribute to WooCommerce products (on \'Inventory\' tab). The multipack attribute refers to multiple identical products that you, the retailer, combine for sale. If you have created a multipack grouping several identical products together, then use the mulitpack attribute to indicate how many products you have grouped together.', 'customer-reviews-woocommerce' ),
     133                    'default'  => 'no',
     134                    'autoload' => false,
     135                    'type'     => 'checkbox'
     136                ),
     137                array(
     138                    'id'       => 'ivole_product_feed_enable_condition',
     139                    'title'    => __( 'Condition', 'customer-reviews-woocommerce' ),
     140                    'desc'     => __( 'Add a condition attribute to WooCommerce products (on \'General\' tab). The condition attribute refers to condition of products you are selling. It is an optional field for new products but required for used and refurbished products.', 'customer-reviews-woocommerce' ),
    130141                    'default'  => 'no',
    131142                    'autoload' => false,
     
    208219                            <tr>
    209220                                <td class="cr-product-feed-categories-td">
     221                                    <select class="cr-product-feed-identifiers-select" name="cr_google_attribute_condition">
     222                                        <option></option>
     223                                        <?php foreach ( $list_fields as $attribute_value => $attribute_name ): ?>
     224                                            <option value="<?php echo $attribute_value; ?>" <?php if ( isset( $option['value']['condition'] ) && $attribute_value == $option['value']['condition'] ) echo "selected"; ?>><?php echo $attribute_name; ?></option>
     225                                        <?php endforeach; ?>
     226                                    </select>
     227                                </td>
     228                                <td class="cr-product-feed-categories-td">condition</td>
     229                            </tr>
     230                            <tr class="cr-alternate">
     231                                <td class="cr-product-feed-categories-td">
    210232                                    <select class="cr-product-feed-identifiers-select" name="cr_google_attribute_gender">
    211233                                        <option></option>
     
    217239                                <td class="cr-product-feed-categories-td">gender</td>
    218240                            </tr>
     241                            <tr>
     242                                <td class="cr-product-feed-categories-td">
     243                                    <select class="cr-product-feed-identifiers-select" name="cr_google_attribute_bundle">
     244                                        <option></option>
     245                                        <?php foreach ( $list_fields as $attribute_value => $attribute_name ): ?>
     246                                            <option value="<?php echo $attribute_value; ?>" <?php if ( isset( $option['value']['bundle'] ) && $attribute_value == $option['value']['bundle'] ) echo "selected"; ?>><?php echo $attribute_name; ?></option>
     247                                        <?php endforeach; ?>
     248                                    </select>
     249                                </td>
     250                                <td class="cr-product-feed-categories-td">is_bundle</td>
     251                            </tr>
    219252                            <tr class="cr-alternate">
    220                                 <td class="cr-product-feed-categories-td">
    221                                     <select class="cr-product-feed-identifiers-select" name="cr_google_attribute_bundle">
    222                                         <option></option>
    223                                         <?php foreach ( $list_fields as $attribute_value => $attribute_name ): ?>
    224                                             <option value="<?php echo $attribute_value; ?>" <?php if ( isset( $option['value']['bundle'] ) && $attribute_value == $option['value']['bundle'] ) echo "selected"; ?>><?php echo $attribute_name; ?></option>
    225                                         <?php endforeach; ?>
    226                                     </select>
    227                                 </td>
    228                                 <td class="cr-product-feed-categories-td">is_bundle</td>
    229                             </tr>
    230                             <tr>
    231253                                <td class="cr-product-feed-categories-td">
    232254                                    <select class="cr-product-feed-identifiers-select" name="cr_google_attribute_material">
     
    374396            $product_attributes['meta__cr_bundle'] = __( 'Product Bundle', 'customer-reviews-woocommerce' );
    375397            $product_attributes['meta__global_unique_id'] = __( 'Global Unique ID', 'customer-reviews-woocommerce' );
     398            $product_attributes['meta__cr_condition'] = __( 'Product Condition', 'customer-reviews-woocommerce' );
    376399
    377400            $product_attributes['tags_tags'] = __( 'Product Tag', 'customer-reviews-woocommerce' );
  • customer-reviews-woocommerce/trunk/includes/google/class-cr-product-fields.php

    r2841356 r3437300  
    99    class CR_Product_Fields {
    1010
    11         private $gtin = false;
    12         private $mpn = false;
    13         private $brand = false;
    14         private $identifier_exists = false;
    15         private $multipack = false;
    16         private $material = false;
    17         private $bundle = false;
    18 
    1911        public function __construct() {
    20             $this->gtin = ( 'yes' === get_option( 'ivole_product_feed_enable_gtin', 'no' ) );
    21             $this->mpn = ( 'yes' === get_option( 'ivole_product_feed_enable_mpn', 'no' ) );
    22             $this->brand = ( 'yes' === get_option( 'ivole_product_feed_enable_brand', 'no' ) );
    23             $this->identifier_exists = ( 'yes' === get_option( 'ivole_product_feed_enable_identifier_exists', 'no' ) );
    24             $this->material = ( 'yes' === get_option( 'ivole_product_feed_enable_material', 'no' ) );
    25             $this->multipack = ( 'yes' === get_option( 'ivole_product_feed_enable_multipack', 'no' ) );
    26             $this->bundle = ( 'yes' === get_option( 'ivole_product_feed_enable_bundle', 'no' ) );
    27 
    28             if(
    29                 $this->gtin || $this->mpn || $this->brand ||
    30                 $this->identifier_exists || $this->multipack || $this->bundle ||
    31                 $this->material
    32             ) {
    33                 add_action( 'woocommerce_product_options_sku', array( $this, 'display_fields' ) );
    34                 add_action( 'woocommerce_product_options_general_product_data', array( $this, 'display_general_fields' ) );
    35                 add_action( 'woocommerce_admin_process_product_object', array( $this, 'save_fields' ) );
    36                 add_action( 'woocommerce_variation_options_pricing', array( $this, 'display_fields_variation'), 10, 3 );
    37                 add_action( 'woocommerce_variation_options', array( $this, 'display_fields_variation_options'), 10, 3 );
    38                 add_action( 'woocommerce_admin_process_variation_object', array( $this, 'save_fields_variation' ), 10, 2 );
    39             }
     12            add_action( 'woocommerce_product_options_sku', array( $this, 'display_fields' ) );
     13            add_action( 'woocommerce_product_options_general_product_data', array( $this, 'display_general_fields' ) );
     14            add_action( 'woocommerce_admin_process_product_object', array( $this, 'save_fields' ) );
     15            add_action( 'woocommerce_variation_options_pricing', array( $this, 'display_fields_variation'), 10, 3 );
     16            add_action( 'woocommerce_variation_options', array( $this, 'display_fields_variation_options'), 10, 3 );
     17            add_action( 'woocommerce_admin_process_variation_object', array( $this, 'save_fields_variation' ), 10, 2 );
    4018        }
    4119
    4220        public function display_fields() {
    4321            global $product_object;
    44             if( $product_object ) {
    45                 if( $this->gtin ) {
     22            if ( $product_object ) {
     23                if ( 'yes' === get_option( 'ivole_product_feed_enable_gtin', 'no' ) ) {
    4624                    woocommerce_wp_text_input(
    4725                        array(
     
    5432                    );
    5533                }
    56                 if( $this->mpn ) {
     34                if ( 'yes' === get_option( 'ivole_product_feed_enable_mpn', 'no' ) ) {
    5735                    woocommerce_wp_text_input(
    5836                        array(
     
    6543                    );
    6644                }
    67                 if( $this->brand ) {
     45                if ( 'yes' === get_option( 'ivole_product_feed_enable_brand', 'no' ) ) {
    6846                    woocommerce_wp_text_input(
    6947                        array(
     
    7654                    );
    7755                }
    78                 if( $this->identifier_exists ) {
     56                if ( 'yes' === get_option( 'ivole_product_feed_enable_identifier_exists', 'no' ) ) {
    7957                    woocommerce_wp_checkbox(
    8058                        array(
     
    8664                    );
    8765                }
    88                 if( $this->multipack ) {
     66                if ( 'yes' === get_option( 'ivole_product_feed_enable_multipack', 'no' ) ) {
    8967                    woocommerce_wp_text_input(
    9068                        array(
     
    9775                    );
    9876                }
    99                 if( $this->bundle ) {
     77                if ( 'yes' === get_option( 'ivole_product_feed_enable_bundle', 'no' ) ) {
    10078                    $bundle_value = $product_object->get_meta( '_cr_bundle', true, 'edit' );
    10179                    if(
     
    126104            global $product_object;
    127105            if ( $product_object ) {
    128                 if( $this->material ) {
     106                $enable_material = ( 'yes' === get_option( 'ivole_product_feed_enable_material', 'no' ) ) ? true : false;
     107                $enable_condition = ( 'yes' === get_option( 'ivole_product_feed_enable_condition', 'no' ) ) ? true : false;
     108                if ( $enable_material || $enable_condition ) {
    129109
    130110                    echo '<div class="options_group">';
    131111
    132                     woocommerce_wp_text_input(
    133                         array(
    134                             'id'          => '_cr_material',
    135                             'value'       => $product_object->get_meta( '_cr_material', true, 'edit' ),
    136                             'label'       => '<abbr title="' . esc_attr__( 'Material attribute for Google Shopping', 'customer-reviews-woocommerce' ) . '">' . esc_html__( 'Material', 'customer-reviews-woocommerce' ) . '</abbr>',
    137                             'desc_tip'    => true,
    138                             'description' => __( 'Use the material attribute to describe the main fabric or material that your product is made of.', 'customer-reviews-woocommerce' )
    139                         )
    140                     );
     112                    if ( $enable_material ) {
     113                        woocommerce_wp_text_input(
     114                            array(
     115                                'id'          => '_cr_material',
     116                                'value'       => $product_object->get_meta( '_cr_material', true, 'edit' ),
     117                                'label'       => '<abbr title="' . esc_attr__( 'Material attribute for Google Shopping', 'customer-reviews-woocommerce' ) . '">' . esc_html__( 'Material', 'customer-reviews-woocommerce' ) . '</abbr>',
     118                                'desc_tip'    => true,
     119                                'description' => __( 'Use the material attribute to describe the main fabric or material that your product is made of.', 'customer-reviews-woocommerce' )
     120                            )
     121                        );
     122                    }
     123
     124                    if ( $enable_condition ) {
     125                        woocommerce_wp_select(
     126                            array(
     127                                'id'          => '_cr_condition',
     128                                'value'       => $product_object->get_meta( '_cr_condition', true, 'edit' ),
     129                                'label'       => '<abbr title="' . esc_attr__( 'Condition attribute for Google Shopping', 'customer-reviews-woocommerce' ) . '">' . esc_html__( 'Condition', 'customer-reviews-woocommerce' ) . '</abbr>',
     130                                'desc_tip'    => true,
     131                                'description' => __( 'Use the condition attribute to describe condition (new, used or refurbished) of products.', 'customer-reviews-woocommerce' ),
     132                                'options'     => array(
     133                                    ''            => __( 'Not specified', 'customer-reviews-woocommerce' ),
     134                                    'new'         => __( 'New', 'customer-reviews-woocommerce' ),
     135                                    'used'        => __( 'Used', 'customer-reviews-woocommerce' ),
     136                                    'refurbished' => __( 'Refurbished', 'customer-reviews-woocommerce' )
     137                                )
     138                            )
     139                        );
     140                    }
    141141
    142142                    echo '</div>';
     
    146146
    147147        public function save_fields( $product ) {
    148             if( $this->gtin ) {
     148            if ( 'yes' === get_option( 'ivole_product_feed_enable_gtin', 'no' ) ) {
    149149                $product->update_meta_data( '_cr_gtin', isset( $_POST['_cr_gtin'] ) ? wc_clean( wp_unslash( $_POST['_cr_gtin'] ) ) : null );
    150150            }
    151             if( $this->mpn ) {
     151            if ( 'yes' === get_option( 'ivole_product_feed_enable_mpn', 'no' ) ) {
    152152                $product->update_meta_data( '_cr_mpn', isset( $_POST['_cr_mpn'] ) ? wc_clean( wp_unslash( $_POST['_cr_mpn'] ) ) : null );
    153153            }
    154             if( $this->brand ) {
     154            if ( 'yes' === get_option( 'ivole_product_feed_enable_brand', 'no' ) ) {
    155155                $product->update_meta_data( '_cr_brand', isset( $_POST['_cr_brand'] ) ? wc_clean( wp_unslash( $_POST['_cr_brand'] ) ) : null );
    156156            }
    157             if( $this->identifier_exists ) {
     157            if ( 'yes' === get_option( 'ivole_product_feed_enable_identifier_exists', 'no' ) ) {
    158158                $product->update_meta_data( '_cr_identifier_exists', ! empty( $_POST['_cr_identifier_exists'] ) );
    159159            }
    160             if( $this->material ) {
     160            if ( 'yes' === get_option( 'ivole_product_feed_enable_material', 'no' ) ) {
    161161                $product->update_meta_data( '_cr_material', isset( $_POST['_cr_material'] ) ? wc_clean( wp_unslash( $_POST['_cr_material'] ) ) : null );
    162162            }
    163             if( $this->multipack ) {
     163            if ( 'yes' === get_option( 'ivole_product_feed_enable_multipack', 'no' ) ) {
    164164                $product->update_meta_data( '_cr_multipack', isset( $_POST['_cr_multipack'] ) ? intval( wc_clean( wp_unslash( $_POST['_cr_multipack'] ) ) ) : null );
    165165            }
    166             if( $this->bundle ) {
     166            if ( 'yes' === get_option( 'ivole_product_feed_enable_bundle', 'no' ) ) {
    167167                $product->update_meta_data( '_cr_bundle', ( isset( $_POST['_cr_bundle'] ) && $_POST['_cr_bundle'] ) ? wc_clean( wp_unslash( $_POST['_cr_bundle'] ) ) : null );
     168            }
     169            if ( 'yes' === get_option( 'ivole_product_feed_enable_condition', 'no' ) ) {
     170                $product->update_meta_data( '_cr_condition', isset( $_POST['_cr_condition'] ) ? wc_clean( wp_unslash( $_POST['_cr_condition'] ) ) : null );
    168171            }
    169172        }
     
    172175            $variation_object = wc_get_product( $variation->ID );
    173176            $css_class = 'form-row-first';
    174             if( $this->gtin ) {
     177            if ( 'yes' === get_option( 'ivole_product_feed_enable_gtin', 'no' ) ) {
    175178                woocommerce_wp_text_input(
    176179                    array(
     
    186189                $css_class = 'form-row-last';
    187190            }
    188             if( $this->mpn ) {
     191            if ( 'yes' === get_option( 'ivole_product_feed_enable_mpn', 'no' ) ) {
    189192                woocommerce_wp_text_input(
    190193                    array(
     
    204207                }
    205208            }
    206             if( $this->brand ) {
     209            if ( 'yes' === get_option( 'ivole_product_feed_enable_brand', 'no' ) ) {
    207210                woocommerce_wp_text_input(
    208211                    array(
     
    222225                }
    223226            }
    224             if( $this->multipack ) {
     227            if ( 'yes' === get_option( 'ivole_product_feed_enable_multipack', 'no' ) ) {
    225228                woocommerce_wp_text_input(
    226229                    array(
     
    240243                }
    241244            }
    242             if( $this->bundle ) {
     245            if ( 'yes' === get_option( 'ivole_product_feed_enable_bundle', 'no' ) ) {
    243246                $bundle_var_value = $variation_object->get_meta( '_cr_bundle', true, 'edit' );
    244247                if(
     
    270273                }
    271274            }
    272             if( $this->material ) {
     275            if ( 'yes' === get_option( 'ivole_product_feed_enable_material', 'no' ) ) {
    273276                woocommerce_wp_text_input(
    274277                    array(
     
    282285                    )
    283286                );
    284             }
    285         }
     287                if ( 'form-row-last' === $css_class ) {
     288                    $css_class = 'form-row-first';
     289                } else {
     290                    $css_class = 'form-row-last';
     291                }
     292            }
     293            if ( 'yes' === get_option( 'ivole_product_feed_enable_condition', 'no' ) ) {
     294                woocommerce_wp_select(
     295                    array(
     296                        'id'          => "_cr_condition_var{$loop}",
     297                        'name'        => "_cr_condition_var[{$loop}]",
     298                        'value'       => $variation_object->get_meta( '_cr_condition', true, 'edit' ),
     299                        'label'       => '<abbr title="' . esc_attr__( 'Condition attribute for Google Shopping', 'customer-reviews-woocommerce' ) . '">' . esc_html__( 'Condition', 'customer-reviews-woocommerce' ) . '</abbr>',
     300                        'desc_tip'    => true,
     301                        'description' => __( 'Use the condition attribute to describe condition (new, used or refurbished) of products.', 'customer-reviews-woocommerce' ),
     302                        'options'     => array(
     303                            ''            => __( 'Not specified', 'customer-reviews-woocommerce' ),
     304                            'new'         => __( 'New', 'customer-reviews-woocommerce' ),
     305                            'used'        => __( 'Used', 'customer-reviews-woocommerce' ),
     306                            'refurbished' => __( 'Refurbished', 'customer-reviews-woocommerce' )
     307                        ),
     308                        'wrapper_class' => 'form-row ' . $css_class
     309                    )
     310                );
     311            }
     312        }
     313
    286314        public function display_fields_variation_options( $loop, $variation_data, $variation ) {
    287315            $variation_object = wc_get_product( $variation->ID );
    288             if( $this->identifier_exists ) {
     316            if ( 'yes' === get_option( 'ivole_product_feed_enable_identifier_exists', 'no' ) ) {
    289317                ?>
    290318                <label class="tips" data-tip="<?php esc_attr_e( 'Enable the option to add "identifier_exists = no" in Google Shopping feed for this variation.', 'customer-reviews-woocommerce' ); ?>">
     
    295323            }
    296324        }
     325
    297326        public function save_fields_variation( $variation, $i ) {
    298             if( $this->gtin ) {
     327            if ( 'yes' === get_option( 'ivole_product_feed_enable_gtin', 'no' ) ) {
    299328                $variation->update_meta_data( '_cr_gtin', isset( $_POST['_cr_gtin_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_gtin_var'][$i] ) ) : null );
    300329            }
    301             if( $this->mpn ) {
     330            if ( 'yes' === get_option( 'ivole_product_feed_enable_mpn', 'no' ) ) {
    302331                $variation->update_meta_data( '_cr_mpn', isset( $_POST['_cr_mpn_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_mpn_var'][$i] ) ) : null );
    303332            }
    304             if( $this->brand ) {
     333            if ( 'yes' === get_option( 'ivole_product_feed_enable_brand', 'no' ) ) {
    305334                $variation->update_meta_data( '_cr_brand', isset( $_POST['_cr_brand_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_brand_var'][$i] ) ) : null );
    306335            }
    307             if( $this->identifier_exists ) {
     336            if ( 'yes' === get_option( 'ivole_product_feed_enable_identifier_exists', 'no' ) ) {
    308337                $variation->update_meta_data( '_cr_identifier_exists', ! empty( $_POST['_cr_identifier_exists_var'][$i] ) );
    309338            }
    310             if( $this->multipack ) {
     339            if ( 'yes' === get_option( 'ivole_product_feed_enable_multipack', 'no' ) ) {
    311340                $variation->update_meta_data( '_cr_multipack', isset( $_POST['_cr_multipack_var'][$i] ) ? intval( wc_clean( wp_unslash( $_POST['_cr_multipack_var'][$i] ) ) ) : null );
    312341            }
    313             if( $this->bundle ) {
     342            if ( 'yes' === get_option( 'ivole_product_feed_enable_bundle', 'no' ) ) {
    314343                $variation->update_meta_data( '_cr_bundle', ( isset( $_POST['_cr_bundle_var'][$i] ) && $_POST['_cr_bundle_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_bundle_var'][$i] ) ) : null );
    315344            }
    316             if( $this->material ) {
     345            if ( 'yes' === get_option( 'ivole_product_feed_enable_material', 'no' ) ) {
    317346                $variation->update_meta_data( '_cr_material', isset( $_POST['_cr_material_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_material_var'][$i] ) ) : null );
    318347            }
    319         }
     348            if ( 'yes' === get_option( 'ivole_product_feed_enable_condition', 'no' ) ) {
     349                $variation->update_meta_data( '_cr_condition', isset( $_POST['_cr_condition_var'][$i] ) ? wc_clean( wp_unslash( $_POST['_cr_condition_var'][$i] ) ) : null );
     350            }
     351        }
     352
    320353    }
    321354
  • customer-reviews-woocommerce/trunk/includes/reviews/class-cr-admin-menu-reviews.php

    r3392565 r3437300  
    516516                    add_meta_box(
    517517                        'cr_reviewer_meta_box',
    518                         __( 'Author Type', 'customer-reviews-woocommerce' ),
     518                        __( 'Reviewer Type', 'customer-reviews-woocommerce' ),
    519519                        array( $this, 'render_reviewer_meta_box' ),
    520520                        $post_type,
  • customer-reviews-woocommerce/trunk/ivole.php

    r3434533 r3437300  
    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.95.0
     6Version: 5.96.0
    77Author: CusRev
    88Author URI: https://www.cusrev.com/business/
  • customer-reviews-woocommerce/trunk/languages/customer-reviews-woocommerce.pot

    r3434533 r3437300  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Customer Reviews for WooCommerce 5.95.0\n"
     5"Project-Id-Version: Customer Reviews for WooCommerce 5.96.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customer-reviews-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-07T16:26:46+00:00\n"
     12"POT-Creation-Date: 2026-01-12T00:32:12+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.8.1\n"
     
    8888
    8989#: includes/analytics/class-cr-reminders-log.php:382
    90 #: includes/google/class-cr-product-fields.php:112
    91 #: includes/google/class-cr-product-fields.php:256
     90#: includes/google/class-cr-product-fields.php:90
     91#: includes/google/class-cr-product-fields.php:259
    9292#: includes/misc/class-cr-admin-menu-diagnostics.php:248
    9393#: includes/misc/class-cr-admin-menu-diagnostics.php:340
     
    106106
    107107#: includes/analytics/class-cr-reminders-log.php:385
    108 #: includes/google/class-cr-product-fields.php:113
    109 #: includes/google/class-cr-product-fields.php:257
     108#: includes/google/class-cr-product-fields.php:91
     109#: includes/google/class-cr-product-fields.php:260
    110110#: includes/misc/class-cr-admin-menu-diagnostics.php:253
    111111#: includes/misc/class-cr-admin-menu-diagnostics.php:340
     
    838838
    839839#: includes/google/class-cr-product-feed-attributes.php:40
    840 #: includes/google/class-cr-product-feed-attributes.php:105
     840#: includes/google/class-cr-product-feed-attributes.php:108
    841841msgid "Product Attributes"
    842842msgstr ""
    843843
    844 #: includes/google/class-cr-product-feed-attributes.php:107
     844#: includes/google/class-cr-product-feed-attributes.php:110
    845845msgid "Specify mapping of WooCommerce product fields to Google Shopping product attributes that might be required in certain countries for some product categories."
    846846msgstr ""
    847847
    848 #: includes/google/class-cr-product-feed-attributes.php:112
     848#: includes/google/class-cr-product-feed-attributes.php:115
    849849msgid "Bundle"
    850850msgstr ""
    851851
    852 #: includes/google/class-cr-product-feed-attributes.php:113
     852#: includes/google/class-cr-product-feed-attributes.php:116
    853853msgid "Add a bundle attribute to WooCommerce products (on 'Inventory' tab). Use the bundle attribute to indicate that you have created a bundle: a main product that you have grouped with other, different products, sold together as one package for a single price."
    854854msgstr ""
    855855
    856 #: includes/google/class-cr-product-feed-attributes.php:120
    857 #: includes/google/class-cr-product-fields.php:136
    858 #: includes/google/class-cr-product-fields.php:278
     856#: includes/google/class-cr-product-feed-attributes.php:123
     857#: includes/google/class-cr-product-fields.php:117
     858#: includes/google/class-cr-product-fields.php:281
    859859msgid "Material"
    860860msgstr ""
    861861
    862 #: includes/google/class-cr-product-feed-attributes.php:121
     862#: includes/google/class-cr-product-feed-attributes.php:124
    863863msgid "Add a material attribute to WooCommerce products (on 'General' tab). Use the material attribute to describe the main fabric or material that your product is made of."
    864864msgstr ""
    865865
    866 #: includes/google/class-cr-product-feed-attributes.php:128
    867 #: includes/google/class-cr-product-fields.php:93
    868 #: includes/google/class-cr-product-fields.php:230
     866#: includes/google/class-cr-product-feed-attributes.php:131
     867#: includes/google/class-cr-product-fields.php:71
     868#: includes/google/class-cr-product-fields.php:233
    869869msgid "Multipack"
    870870msgstr ""
    871871
    872 #: includes/google/class-cr-product-feed-attributes.php:129
     872#: includes/google/class-cr-product-feed-attributes.php:132
    873873msgid "Add a multipack attribute to WooCommerce products (on 'Inventory' tab). The multipack attribute refers to multiple identical products that you, the retailer, combine for sale. If you have created a multipack grouping several identical products together, then use the mulitpack attribute to indicate how many products you have grouped together."
    874874msgstr ""
    875875
    876 #: includes/google/class-cr-product-feed-attributes.php:173
     876#: includes/google/class-cr-product-feed-attributes.php:139
     877#: includes/google/class-cr-product-fields.php:129
     878#: includes/google/class-cr-product-fields.php:299
     879msgid "Condition"
     880msgstr ""
     881
     882#: includes/google/class-cr-product-feed-attributes.php:140
     883msgid "Add a condition attribute to WooCommerce products (on 'General' tab). The condition attribute refers to condition of products you are selling. It is an optional field for new products but required for used and refurbished products."
     884msgstr ""
     885
     886#: includes/google/class-cr-product-feed-attributes.php:184
    877887#: includes/google/class-cr-product-feed-identifiers.php:174
    878888msgid "WooCommerce Product Field"
    879889msgstr ""
    880890
    881 #: includes/google/class-cr-product-feed-attributes.php:174
     891#: includes/google/class-cr-product-feed-attributes.php:185
    882892#: includes/google/class-cr-product-feed-identifiers.php:175
    883893msgid "Select a product field that should be mapped"
    884894msgstr ""
    885895
    886 #: includes/google/class-cr-product-feed-attributes.php:179
     896#: includes/google/class-cr-product-feed-attributes.php:190
    887897msgid "Google Shopping Attribute"
    888898msgstr ""
    889899
    890 #: includes/google/class-cr-product-feed-attributes.php:180
     900#: includes/google/class-cr-product-feed-attributes.php:191
    891901msgid "Product attributes required by Google Shopping in some countries"
    892902msgstr ""
    893903
    894 #: includes/google/class-cr-product-feed-attributes.php:307
     904#: includes/google/class-cr-product-feed-attributes.php:329
    895905#: includes/google/class-cr-product-feed-identifiers.php:197
    896906msgid "Product ID"
    897907msgstr ""
    898908
    899 #: includes/google/class-cr-product-feed-attributes.php:308
     909#: includes/google/class-cr-product-feed-attributes.php:330
    900910msgid "Product SKU"
    901911msgstr ""
    902912
    903 #: includes/google/class-cr-product-feed-attributes.php:309
     913#: includes/google/class-cr-product-feed-attributes.php:331
    904914msgid "Product Name"
    905915msgstr ""
    906916
    907 #: includes/google/class-cr-product-feed-attributes.php:369
     917#: includes/google/class-cr-product-feed-attributes.php:391
    908918msgid "Product GTIN"
    909919msgstr ""
    910920
    911 #: includes/google/class-cr-product-feed-attributes.php:370
     921#: includes/google/class-cr-product-feed-attributes.php:392
    912922msgid "Product MPN"
    913923msgstr ""
    914924
    915 #: includes/google/class-cr-product-feed-attributes.php:371
     925#: includes/google/class-cr-product-feed-attributes.php:393
    916926msgid "Product Brand"
    917927msgstr ""
    918928
    919 #: includes/google/class-cr-product-feed-attributes.php:372
     929#: includes/google/class-cr-product-feed-attributes.php:394
    920930msgid "Product Material"
    921931msgstr ""
    922932
    923 #: includes/google/class-cr-product-feed-attributes.php:373
     933#: includes/google/class-cr-product-feed-attributes.php:395
    924934msgid "Product Multipack"
    925935msgstr ""
    926936
    927 #: includes/google/class-cr-product-feed-attributes.php:374
     937#: includes/google/class-cr-product-feed-attributes.php:396
    928938msgid "Product Bundle"
    929939msgstr ""
    930940
    931 #: includes/google/class-cr-product-feed-attributes.php:375
     941#: includes/google/class-cr-product-feed-attributes.php:397
    932942msgid "Global Unique ID"
    933943msgstr ""
    934944
    935 #: includes/google/class-cr-product-feed-attributes.php:377
     945#: includes/google/class-cr-product-feed-attributes.php:398
     946msgid "Product Condition"
     947msgstr ""
     948
     949#: includes/google/class-cr-product-feed-attributes.php:400
    936950msgid "Product Tag"
    937951msgstr ""
     
    10251039#: includes/google/class-cr-product-feed-identifiers.php:210
    10261040#: includes/google/class-cr-product-feed-reviews.php:163
    1027 #: includes/google/class-cr-product-fields.php:50
    1028 #: includes/google/class-cr-product-fields.php:180
     1041#: includes/google/class-cr-product-fields.php:28
     1042#: includes/google/class-cr-product-fields.php:183
    10291043msgid "GTIN"
    10301044msgstr ""
     
    10371051#: includes/google/class-cr-product-feed-identifiers.php:223
    10381052#: includes/google/class-cr-product-feed-reviews.php:176
    1039 #: includes/google/class-cr-product-fields.php:61
    1040 #: includes/google/class-cr-product-fields.php:194
     1053#: includes/google/class-cr-product-fields.php:39
     1054#: includes/google/class-cr-product-fields.php:197
    10411055msgid "MPN"
    10421056msgstr ""
     
    10491063#: includes/google/class-cr-product-feed-identifiers.php:236
    10501064#: includes/google/class-cr-product-feed-reviews.php:202
    1051 #: includes/google/class-cr-product-fields.php:72
    1052 #: includes/google/class-cr-product-fields.php:212
     1065#: includes/google/class-cr-product-fields.php:50
     1066#: includes/google/class-cr-product-fields.php:215
    10531067msgid "Brand"
    10541068msgstr ""
     
    10591073
    10601074#: includes/google/class-cr-product-feed-identifiers.php:118
    1061 #: includes/google/class-cr-product-fields.php:83
    1062 #: includes/google/class-cr-product-fields.php:291
     1075#: includes/google/class-cr-product-fields.php:61
     1076#: includes/google/class-cr-product-fields.php:319
    10631077msgid "identifier_exists"
    10641078msgstr ""
     
    13231337msgstr[1] ""
    13241338
    1325 #: includes/google/class-cr-product-fields.php:50
    1326 #: includes/google/class-cr-product-fields.php:180
     1339#: includes/google/class-cr-product-fields.php:28
     1340#: includes/google/class-cr-product-fields.php:183
    13271341msgid "Global Trade Item Number"
    13281342msgstr ""
    13291343
     1344#: includes/google/class-cr-product-fields.php:30
     1345#: includes/google/class-cr-product-fields.php:185
     1346msgid "GTIN refers to a Global Trade Item Number, a globally unique number used to identify trade items, products, or services that can be purchased. GTIN is also an umbrella term that refers to UPC, EAN, JAN, and ISBN."
     1347msgstr ""
     1348
     1349#: includes/google/class-cr-product-fields.php:39
     1350#: includes/google/class-cr-product-fields.php:197
     1351msgid "Manufacturer Part Number"
     1352msgstr ""
     1353
     1354#: includes/google/class-cr-product-fields.php:41
     1355#: includes/google/class-cr-product-fields.php:199
     1356msgid "MPN refers to a Manufacturer Part Number, a number that uniquely identifies the product to its manufacturer."
     1357msgstr ""
     1358
    13301359#: includes/google/class-cr-product-fields.php:52
    1331 #: includes/google/class-cr-product-fields.php:182
    1332 msgid "GTIN refers to a Global Trade Item Number, a globally unique number used to identify trade items, products, or services that can be purchased. GTIN is also an umbrella term that refers to UPC, EAN, JAN, and ISBN."
     1360#: includes/google/class-cr-product-fields.php:217
     1361msgid "The brand of the product."
    13331362msgstr ""
    13341363
    13351364#: includes/google/class-cr-product-fields.php:61
    1336 #: includes/google/class-cr-product-fields.php:194
    1337 msgid "Manufacturer Part Number"
    1338 msgstr ""
    1339 
    1340 #: includes/google/class-cr-product-fields.php:63
    1341 #: includes/google/class-cr-product-fields.php:196
    1342 msgid "MPN refers to a Manufacturer Part Number, a number that uniquely identifies the product to its manufacturer."
    1343 msgstr ""
    1344 
    1345 #: includes/google/class-cr-product-fields.php:74
    1346 #: includes/google/class-cr-product-fields.php:214
    1347 msgid "The brand of the product."
    1348 msgstr ""
    1349 
    1350 #: includes/google/class-cr-product-fields.php:83
    13511365msgid "identifier_exists attribute for Google Shopping"
    13521366msgstr ""
    13531367
    1354 #: includes/google/class-cr-product-fields.php:84
     1368#: includes/google/class-cr-product-fields.php:62
    13551369msgid "Enable the checkbox to add \"identifier_exists = no\" in Google Shopping feed for this product."
    13561370msgstr ""
    13571371
    1358 #: includes/google/class-cr-product-fields.php:93
    1359 #: includes/google/class-cr-product-fields.php:230
     1372#: includes/google/class-cr-product-fields.php:71
     1373#: includes/google/class-cr-product-fields.php:233
    13601374msgid "Multipack attribute for Google Shopping"
    13611375msgstr ""
    13621376
    1363 #: includes/google/class-cr-product-fields.php:95
     1377#: includes/google/class-cr-product-fields.php:73
    13641378msgid "If this product is a multipack, use the multipack attribute to indicate how many products you’ve grouped together."
    13651379msgstr ""
    13661380
    1367 #: includes/google/class-cr-product-fields.php:114
    1368 #: includes/google/class-cr-product-fields.php:258
     1381#: includes/google/class-cr-product-fields.php:92
     1382#: includes/google/class-cr-product-fields.php:261
    13691383msgid "Default"
    13701384msgstr ""
    13711385
    1372 #: includes/google/class-cr-product-fields.php:116
    1373 #: includes/google/class-cr-product-fields.php:260
     1386#: includes/google/class-cr-product-fields.php:94
     1387#: includes/google/class-cr-product-fields.php:263
    13741388msgid "is_bundle attribute for Google Shopping"
    13751389msgstr ""
    13761390
    1377 #: includes/google/class-cr-product-fields.php:116
    1378 #: includes/google/class-cr-product-fields.php:260
     1391#: includes/google/class-cr-product-fields.php:94
     1392#: includes/google/class-cr-product-fields.php:263
    13791393msgid "is_bundle"
    13801394msgstr ""
    13811395
    1382 #: includes/google/class-cr-product-fields.php:118
    1383 #: includes/google/class-cr-product-fields.php:262
     1396#: includes/google/class-cr-product-fields.php:96
     1397#: includes/google/class-cr-product-fields.php:265
    13841398msgid "If this product is a bundle, use the is_bundle attribute to flag it as bundle in the XML Product Feed for Google Shopping."
    13851399msgstr ""
    13861400
     1401#: includes/google/class-cr-product-fields.php:117
     1402#: includes/google/class-cr-product-fields.php:281
     1403msgid "Material attribute for Google Shopping"
     1404msgstr ""
     1405
     1406#: includes/google/class-cr-product-fields.php:119
     1407#: includes/google/class-cr-product-fields.php:283
     1408msgid "Use the material attribute to describe the main fabric or material that your product is made of."
     1409msgstr ""
     1410
     1411#: includes/google/class-cr-product-fields.php:129
     1412#: includes/google/class-cr-product-fields.php:299
     1413msgid "Condition attribute for Google Shopping"
     1414msgstr ""
     1415
     1416#: includes/google/class-cr-product-fields.php:131
     1417#: includes/google/class-cr-product-fields.php:301
     1418msgid "Use the condition attribute to describe condition (new, used or refurbished) of products."
     1419msgstr ""
     1420
     1421#: includes/google/class-cr-product-fields.php:133
     1422#: includes/google/class-cr-product-fields.php:303
     1423msgid "Not specified"
     1424msgstr ""
     1425
     1426#: includes/google/class-cr-product-fields.php:134
     1427#: includes/google/class-cr-product-fields.php:304
     1428msgid "New"
     1429msgstr ""
     1430
     1431#: includes/google/class-cr-product-fields.php:135
     1432#: includes/google/class-cr-product-fields.php:305
     1433msgid "Used"
     1434msgstr ""
     1435
    13871436#: includes/google/class-cr-product-fields.php:136
    1388 #: includes/google/class-cr-product-fields.php:278
    1389 msgid "Material attribute for Google Shopping"
    1390 msgstr ""
    1391 
    1392 #: includes/google/class-cr-product-fields.php:138
    1393 #: includes/google/class-cr-product-fields.php:280
    1394 msgid "Use the material attribute to describe the main fabric or material that your product is made of."
    1395 msgstr ""
    1396 
    1397 #: includes/google/class-cr-product-fields.php:232
     1437#: includes/google/class-cr-product-fields.php:306
     1438msgid "Refurbished"
     1439msgstr ""
     1440
     1441#: includes/google/class-cr-product-fields.php:235
    13981442msgid "If this product is a multipack, then use the multipack attribute to indicate how many products you’ve grouped together."
    13991443msgstr ""
    14001444
    1401 #: includes/google/class-cr-product-fields.php:290
     1445#: includes/google/class-cr-product-fields.php:318
    14021446msgid "Enable the option to add \"identifier_exists = no\" in Google Shopping feed for this variation."
    14031447msgstr ""
     
    29613005
    29623006#: includes/reviews/class-cr-admin-menu-reviews.php:518
    2963 msgid "Author Type"
     3007msgid "Reviewer Type"
    29643008msgstr ""
    29653009
  • customer-reviews-woocommerce/trunk/readme.txt

    r3434533 r3437300  
    55Tested up to: 6.9
    66Requires PHP: 7.2
    7 Stable tag: 5.95.0
     7Stable tag: 5.96.0
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl.html
     
    235235== Changelog ==
    236236
     237= 5.96.0 =
     238* New feature: 'condition' attribute support for Google Shopping product XML feed
     239* Improvement: reduced number of option checks on page load
    237240= 5.95.0 =
    238241* Improvement: reviews dashboard in admin console displays revenue attributed to purchases influenced by product recommendations shown on aggregated review forms
  • customer-reviews-woocommerce/trunk/uninstall.php

    r3376803 r3437300  
    125125    'ivole_product_feed_enable_material',
    126126    'ivole_product_feed_enable_multipack',
     127    'ivole_product_feed_enable_condition',
    127128    'ivole_product_feed_enable_bundle',
    128129    'ivole_product_feed_enable_identifier_exists',
Note: See TracChangeset for help on using the changeset viewer.