Version Description
- New feature: optional 'size' attribute was added to the XML product feeds for Google Shopping
- Bug fix: incorrect 'from' email for Q&A reply notifications displayed on the overview screen for email templates
Download this release
Release Info
Developer | ivole |
Plugin | Customer Reviews for WooCommerce |
Version | 5.9.0 |
Comparing to | |
See all releases |
Code changes from version 5.8.1 to 5.9.0
class-ivole.php
CHANGED
@@ -67,7 +67,7 @@ require_once( __DIR__ . '/includes/qna/class-cr-qna-shortcode.php' );
|
|
67 |
require_once( __DIR__ . '/includes/qna/class-cr-qna-email.php' );
|
68 |
|
69 |
class Ivole {
|
70 |
-
const CR_VERSION = '5.
|
71 |
|
72 |
public function __construct() {
|
73 |
if( function_exists( 'wc' ) ) {
|
67 |
require_once( __DIR__ . '/includes/qna/class-cr-qna-email.php' );
|
68 |
|
69 |
class Ivole {
|
70 |
+
const CR_VERSION = '5.9.0';
|
71 |
|
72 |
public function __construct() {
|
73 |
if( function_exists( 'wc' ) ) {
|
includes/google/class-cr-google-shopping-prod-feed.php
CHANGED
@@ -314,6 +314,13 @@ class CR_Google_Shopping_Prod_Feed {
|
|
314 |
$xml_writer->endElement();
|
315 |
}
|
316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
$xml_writer->endElement(); // </entry>
|
318 |
}
|
319 |
|
@@ -349,9 +356,10 @@ class CR_Google_Shopping_Prod_Feed {
|
|
349 |
) );
|
350 |
|
351 |
$attributes = get_option( 'ivole_product_feed_attributes', array(
|
352 |
-
'age_group'
|
353 |
-
'color'
|
354 |
-
'gender'
|
|
|
355 |
) );
|
356 |
|
357 |
$exclude = get_option( 'ivole_excl_product_ids', array() );
|
@@ -555,6 +563,14 @@ class CR_Google_Shopping_Prod_Feed {
|
|
555 |
if( is_array( $attributes ) && isset( $attributes['gender'] ) ) {
|
556 |
$_product->gender = CR_Google_Shopping_Prod_Feed::get_field( $attributes['gender'], $product );
|
557 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
$_product->identifier_exists = CR_Google_Shopping_Prod_Feed::get_field( 'meta__cr_identifier_exists', $product );
|
559 |
$_product->product_type = '';
|
560 |
$_product->google_product_category = '';
|
314 |
$xml_writer->endElement();
|
315 |
}
|
316 |
|
317 |
+
// <size>
|
318 |
+
if( $review->size ) {
|
319 |
+
$xml_writer->startElement( 'g:size' );
|
320 |
+
$xml_writer->text( $review->size );
|
321 |
+
$xml_writer->endElement();
|
322 |
+
}
|
323 |
+
|
324 |
$xml_writer->endElement(); // </entry>
|
325 |
}
|
326 |
|
356 |
) );
|
357 |
|
358 |
$attributes = get_option( 'ivole_product_feed_attributes', array(
|
359 |
+
'age_group' => '',
|
360 |
+
'color' => '',
|
361 |
+
'gender' => '',
|
362 |
+
'size' => ''
|
363 |
) );
|
364 |
|
365 |
$exclude = get_option( 'ivole_excl_product_ids', array() );
|
563 |
if( is_array( $attributes ) && isset( $attributes['gender'] ) ) {
|
564 |
$_product->gender = CR_Google_Shopping_Prod_Feed::get_field( $attributes['gender'], $product );
|
565 |
}
|
566 |
+
$_product->size = '';
|
567 |
+
if( is_array( $attributes ) && isset( $attributes['size'] ) ) {
|
568 |
+
$_product->size = CR_Google_Shopping_Prod_Feed::get_field( $attributes['size'], $product );
|
569 |
+
// if there are multiple sizes and they are separated by ', ', replace it with '/' as Google requires
|
570 |
+
$_product->size = str_replace( ', ', '/', $_product->size );
|
571 |
+
// the maximum length of the field should be 100 chars
|
572 |
+
$_product->size = mb_substr( $_product->size, 0, 100 );
|
573 |
+
}
|
574 |
$_product->identifier_exists = CR_Google_Shopping_Prod_Feed::get_field( 'meta__cr_identifier_exists', $product );
|
575 |
$_product->product_type = '';
|
576 |
$_product->google_product_category = '';
|
includes/google/class-cr-product-feed-attributes.php
CHANGED
@@ -59,6 +59,9 @@ if ( ! class_exists( 'CR_Attributes_Product_Feed' ) ):
|
|
59 |
if( isset( $_POST['cr_google_attribute_gender'] ) ) {
|
60 |
$product_fields['gender'] = $_POST['cr_google_attribute_gender'];
|
61 |
}
|
|
|
|
|
|
|
62 |
}
|
63 |
$_POST['ivole_product_feed_attributes'] = $product_fields;
|
64 |
WC_Admin_Settings::save_fields( $this->settings );
|
@@ -104,9 +107,10 @@ if ( ! class_exists( 'CR_Attributes_Product_Feed' ) ):
|
|
104 |
public function display_product_feed_attributes( $option ) {
|
105 |
if( !$option['value'] ) {
|
106 |
$option['value'] = array(
|
107 |
-
'age_group'
|
108 |
-
'color'
|
109 |
-
'gender'
|
|
|
110 |
);
|
111 |
}
|
112 |
$list_fields = $this->get_product_attributes();
|
@@ -164,6 +168,17 @@ if ( ! class_exists( 'CR_Attributes_Product_Feed' ) ):
|
|
164 |
</td>
|
165 |
<td class="cr-product-feed-categories-td">gender</td>
|
166 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
</tbody>
|
168 |
</table>
|
169 |
</td>
|
59 |
if( isset( $_POST['cr_google_attribute_gender'] ) ) {
|
60 |
$product_fields['gender'] = $_POST['cr_google_attribute_gender'];
|
61 |
}
|
62 |
+
if( isset( $_POST['cr_google_attribute_size'] ) ) {
|
63 |
+
$product_fields['size'] = $_POST['cr_google_attribute_size'];
|
64 |
+
}
|
65 |
}
|
66 |
$_POST['ivole_product_feed_attributes'] = $product_fields;
|
67 |
WC_Admin_Settings::save_fields( $this->settings );
|
107 |
public function display_product_feed_attributes( $option ) {
|
108 |
if( !$option['value'] ) {
|
109 |
$option['value'] = array(
|
110 |
+
'age_group' => '',
|
111 |
+
'color' => '',
|
112 |
+
'gender' => '',
|
113 |
+
'size' => ''
|
114 |
);
|
115 |
}
|
116 |
$list_fields = $this->get_product_attributes();
|
168 |
</td>
|
169 |
<td class="cr-product-feed-categories-td">gender</td>
|
170 |
</tr>
|
171 |
+
<tr>
|
172 |
+
<td class="cr-product-feed-categories-td">
|
173 |
+
<select class="cr-product-feed-identifiers-select" name="cr_google_attribute_size">
|
174 |
+
<option></option>
|
175 |
+
<?php foreach ( $list_fields as $attribute_value => $attribute_name ): ?>
|
176 |
+
<option value="<?php echo $attribute_value; ?>" <?php if ( $attribute_value == $option['value']['size'] ) echo "selected"; ?>><?php echo $attribute_name; ?></option>
|
177 |
+
<?php endforeach; ?>
|
178 |
+
</select>
|
179 |
+
</td>
|
180 |
+
<td class="cr-product-feed-categories-td">size</td>
|
181 |
+
</tr>
|
182 |
</tbody>
|
183 |
</table>
|
184 |
</td>
|
includes/settings/class-cr-settings-email-template.php
CHANGED
@@ -111,7 +111,7 @@ if ( ! class_exists( 'CR_Email_Template' ) ):
|
|
111 |
}
|
112 |
break;
|
113 |
case 'qna_reply':
|
114 |
-
$from = apply_filters( 'wp_mail_from', get_option( 'admin_email' ) );
|
115 |
$from_name = get_option( 'ivole_email_from_name_' . $this->name );
|
116 |
if( 0 < strlen( $from_name ) && 0 < strlen( $from ) ) {
|
117 |
$from = $from_name . ' <' . $from . '>';
|
111 |
}
|
112 |
break;
|
113 |
case 'qna_reply':
|
114 |
+
$from = get_option( 'ivole_email_from_' . $this->name, apply_filters( 'wp_mail_from', get_option( 'admin_email' ) ) );
|
115 |
$from_name = get_option( 'ivole_email_from_name_' . $this->name );
|
116 |
if( 0 < strlen( $from_name ) && 0 < strlen( $from ) ) {
|
117 |
$from = $from_name . ' <' . $from . '>';
|
ivole.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Customer Reviews for WooCommerce
|
4 |
Description: Customer Reviews for WooCommerce plugin helps you get more customer reviews for your shop by sending automated reminders and coupons.
|
5 |
Plugin URI: https://wordpress.org/plugins/customer-reviews-woocommerce/
|
6 |
-
Version: 5.
|
7 |
Author: CusRev
|
8 |
Author URI: https://www.cusrev.com/business/
|
9 |
Text Domain: customer-reviews-woocommerce
|
3 |
Plugin Name: Customer Reviews for WooCommerce
|
4 |
Description: Customer Reviews for WooCommerce plugin helps you get more customer reviews for your shop by sending automated reminders and coupons.
|
5 |
Plugin URI: https://wordpress.org/plugins/customer-reviews-woocommerce/
|
6 |
+
Version: 5.9.0
|
7 |
Author: CusRev
|
8 |
Author URI: https://www.cusrev.com/business/
|
9 |
Text Domain: customer-reviews-woocommerce
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ivole
|
|
3 |
Tags: woocommerce, review plugin, review reminder, customer reviews, review for discount
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 6.1
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -218,6 +218,9 @@ If you would like to change how reviews are sorted on product pages, it is possi
|
|
218 |
|
219 |
== Changelog ==
|
220 |
|
|
|
|
|
|
|
221 |
= 5.8.1 =
|
222 |
* Bug fix: undefined array key 'verified'
|
223 |
* Bug fix: trust badges shortcodes are not rendered on the frontend
|
3 |
Tags: woocommerce, review plugin, review reminder, customer reviews, review for discount
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 6.1
|
6 |
+
Stable tag: 5.9.0
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl.html
|
9 |
|
218 |
|
219 |
== Changelog ==
|
220 |
|
221 |
+
= 5.9.0 =
|
222 |
+
* New feature: optional 'size' attribute was added to the XML product feeds for Google Shopping
|
223 |
+
* Bug fix: incorrect 'from' email for Q&A reply notifications displayed on the overview screen for email templates
|
224 |
= 5.8.1 =
|
225 |
* Bug fix: undefined array key 'verified'
|
226 |
* Bug fix: trust badges shortcodes are not rendered on the frontend
|