Skip to content

Commit

Permalink
Bug fix for tags and version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderly committed Oct 12, 2021
1 parent 1a408af commit 9073a9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/class-ss-wc-mailchimp-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class SS_WC_MailChimp_Plugin {
*
* @var string
*/
private static $version = '2.4.7';
private static $version = '2.4.8';

/**
* Plugin singleton instance
Expand Down
6 changes: 4 additions & 2 deletions includes/class-ss-wc-mailchimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ public function subscribe( $list_id, $email_address, $email_type, $merge_fields,

$subscriber_hash = $this->get_subscriber_hash( $email_address );

$resource = "lists/$list_id/members/$subscriber_hash?skip_merge_validation=true";
$base_resource = "lists/$list_id/members/$subscriber_hash";

$resource = "$base_resource?skip_merge_validation=true";

$response = $this->api->put( $resource, $args );

Expand All @@ -231,7 +233,7 @@ public function subscribe( $list_id, $email_address, $email_type, $merge_fields,

do_action( 'sswcmc_log', __METHOD__ . ' Attempting to add tags to subscriber ('.$email_address.'): ' . print_r( $args, true ) );

$response_tags = $this->api->post( $resource . '/tags', $args );
$response_tags = $this->api->post( $base_resource . '/tags', $args );

do_action( 'sswcmc_log', __METHOD__ . ' Subscriber tags response: ' . print_r( $response_tags, true ) );
}
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Requires at least: 4.7.0
Tested up to: 5.8.1
WC tested up to: 5.7.1
Requires PHP: 5.6
Stable tag: 2.4.7
Stable tag: 2.4.8
Version: 2.4.8
License: GPLv3

Simple and flexible Mailchimp integration for WooCommerce.
Expand Down Expand Up @@ -119,6 +120,9 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie

== Changelog ==

#### 2.4.8 - Oct 12, 2021
- Bug fix for tags not passing to Mailchimp.

#### 2.4.7 - Oct 6, 2021
- Update to pass skip_merge_validation argument when subscribing users.

Expand Down
2 changes: 1 addition & 1 deletion woocommerce-mailchimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: WP WooCommerce Mailchimp provides simple and flexible Mailchimp integration for WooCommerce.
* Author: Saint Systems
* Author URI: https://www.saintsystems.com
* Version: 2.4.7
* Version: 2.4.8
* WC tested up to: 5.7.1
* Text Domain: woocommerce-mailchimp
* Domain Path: languages
Expand Down

0 comments on commit 9073a9d

Please sign in to comment.