Changeset 2951826
- Timestamp:
- 08/10/2023 08:25:51 PM (3 years ago)
- Location:
- woocommerce-mailchimp
- Files:
-
- 10 edited
- 1 copied
-
tags/2.4.12 (copied) (copied from woocommerce-mailchimp/trunk)
-
tags/2.4.12/includes/class-ss-wc-mailchimp-api.php (modified) (1 diff)
-
tags/2.4.12/includes/class-ss-wc-mailchimp-handler.php (modified) (4 diffs)
-
tags/2.4.12/includes/class-ss-wc-mailchimp-plugin.php (modified) (2 diffs)
-
tags/2.4.12/readme.txt (modified) (2 diffs)
-
tags/2.4.12/woocommerce-mailchimp.php (modified) (1 diff)
-
trunk/includes/class-ss-wc-mailchimp-api.php (modified) (1 diff)
-
trunk/includes/class-ss-wc-mailchimp-handler.php (modified) (4 diffs)
-
trunk/includes/class-ss-wc-mailchimp-plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce-mailchimp.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-mailchimp/tags/2.4.12/includes/class-ss-wc-mailchimp-api.php
r2692118 r2951826 257 257 /** 258 258 * Concatenates Mailchimp API errors array into string. 259 * @param array $error 259 * @param array $error 260 260 * @return string String representation of the concatenated Mailchimp API errors. 261 261 */ 262 262 private function concat_errors( $error ) { 263 264 if ( !is_array( $error ) || !is _array( $error['errors'] ) ) {263 264 if ( !is_array( $error ) || !isset( $error['errors'] ) || !is_array( $error['errors'] ) ) { 265 265 return ''; 266 266 } 267 268 $fields = array_map(function($err) { 267 268 $fields = array_map(function($err) { 269 269 return '{ field: ' . $err['field'] . ', message: ' . $err['message'] . ' }'; 270 270 }, $error['errors'] ); -
woocommerce-mailchimp/tags/2.4.12/includes/class-ss-wc-mailchimp-handler.php
r2538132 r2951826 21 21 /** 22 22 * 23 * 24 * Plugin singleton instance 23 * Class singleton instance 25 24 * 26 25 * @var SS_WC_MailChimp_Handler 27 26 */ 28 27 private static $instance = null; 28 29 /** 30 * 31 * Main Plugin instance 32 * 33 * @var SS_WC_MailChimp_Plugin 34 */ 35 private $sswcmc = null; 36 37 /** 38 * Id 39 * 40 * @var string 41 */ 42 private $id = null; 43 44 /** 45 * Namespace 46 * 47 * @var string 48 */ 49 private $namespace = null; 50 51 /** 52 * Label 53 * 54 * @var string 55 */ 56 private $label = null; 29 57 30 58 /** … … 124 152 125 153 // Get the ss_wc_mailchimp_opt_in value from the post meta ("order_custom_fields" was removed with WooCommerce 2.1). 126 $subscribe_customer = get_post_meta( $id,'ss_wc_mailchimp_opt_in', true );154 $subscribe_customer = $order->get_meta( 'ss_wc_mailchimp_opt_in', true ); 127 155 128 156 $order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id; … … 396 424 public function maybe_subscribe( $order_id ) { 397 425 398 // Get the ss_wc_mailchimp_opt_in value from the post meta ("order_custom_fields" was removed with WooCommerce 2.1). 399 $subscribe_customer = get_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', true ); 426 $order = $this->wc_get_order( $order_id ); 427 428 // Get the ss_wc_mailchimp_opt_in value from the order meta ("order_custom_fields" was removed with WooCommerce 2.1). 429 $subscribe_customer = $order->get_meta( 'ss_wc_mailchimp_opt_in', true ); 400 430 401 431 // Get the subscribe options. … … 513 543 $opt_in = isset( $_POST['ss_wc_mailchimp_opt_in'] ) ? 'yes' : 'no'; 514 544 515 update_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', $opt_in ); 545 $order = $this->wc_get_order( $order_id ); 546 547 // update_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', $opt_in ); 548 549 $order->update_meta_data( 'ss_wc_mailchimp_opt_in', $opt_in ); 550 $order->save(); 551 516 552 } 517 553 } -
woocommerce-mailchimp/tags/2.4.12/includes/class-ss-wc-mailchimp-plugin.php
r2940592 r2951826 16 16 * @var string 17 17 */ 18 private static $version = '2.4.1 0';18 private static $version = '2.4.12'; 19 19 20 20 /** … … 474 474 475 475 } 476 477 // Declare compatibility with custom order tables for WooCommerce. 478 add_action( 479 'before_woocommerce_init', 480 function () { 481 if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { 482 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', SS_WC_MAILCHIMP_FILE, true ); 483 } 484 } 485 ); 476 486 477 487 } //end function add_hooks -
woocommerce-mailchimp/tags/2.4.12/readme.txt
r2940592 r2951826 4 4 Tags: woocommerce, mailchimp, ecommerce, email 5 5 Requires at least: 4.7.0 6 Tested up to: 6. 2.27 WC tested up to: 7.9.06 Tested up to: 6.3 7 WC tested up to: 8.0.1 8 8 Requires PHP: 5.6 9 Stable tag: 2.4.1 010 Version: 2.4.1 09 Stable tag: 2.4.12 10 Version: 2.4.12 11 11 License: GPLv3 12 12 … … 120 120 121 121 == Changelog == 122 123 #### 2.4.12 - Aug 10, 2023 124 - Support for WooCommerce HPOS (High Performance Order Storage). 125 - Bump WC tested version up to 8.0.1. 126 - Bump WP tested version up to 6.3. 127 128 #### 2.4.11 - Jul 20, 2023 129 - PHP 8+ exception bug fix - check if array key exists. 122 130 123 131 #### 2.4.10 - Jul 19, 2023 -
woocommerce-mailchimp/tags/2.4.12/woocommerce-mailchimp.php
r2940592 r2951826 6 6 * Author: Saint Systems 7 7 * Author URI: https://www.saintsystems.com 8 * Version: 2.4.1 09 * WC tested up to: 7.9.08 * Version: 2.4.12 9 * WC tested up to: 8.0.1 10 10 * Text Domain: woocommerce-mailchimp 11 11 * Domain Path: languages -
woocommerce-mailchimp/trunk/includes/class-ss-wc-mailchimp-api.php
r2692118 r2951826 257 257 /** 258 258 * Concatenates Mailchimp API errors array into string. 259 * @param array $error 259 * @param array $error 260 260 * @return string String representation of the concatenated Mailchimp API errors. 261 261 */ 262 262 private function concat_errors( $error ) { 263 264 if ( !is_array( $error ) || !is _array( $error['errors'] ) ) {263 264 if ( !is_array( $error ) || !isset( $error['errors'] ) || !is_array( $error['errors'] ) ) { 265 265 return ''; 266 266 } 267 268 $fields = array_map(function($err) { 267 268 $fields = array_map(function($err) { 269 269 return '{ field: ' . $err['field'] . ', message: ' . $err['message'] . ' }'; 270 270 }, $error['errors'] ); -
woocommerce-mailchimp/trunk/includes/class-ss-wc-mailchimp-handler.php
r2538132 r2951826 21 21 /** 22 22 * 23 * 24 * Plugin singleton instance 23 * Class singleton instance 25 24 * 26 25 * @var SS_WC_MailChimp_Handler 27 26 */ 28 27 private static $instance = null; 28 29 /** 30 * 31 * Main Plugin instance 32 * 33 * @var SS_WC_MailChimp_Plugin 34 */ 35 private $sswcmc = null; 36 37 /** 38 * Id 39 * 40 * @var string 41 */ 42 private $id = null; 43 44 /** 45 * Namespace 46 * 47 * @var string 48 */ 49 private $namespace = null; 50 51 /** 52 * Label 53 * 54 * @var string 55 */ 56 private $label = null; 29 57 30 58 /** … … 124 152 125 153 // Get the ss_wc_mailchimp_opt_in value from the post meta ("order_custom_fields" was removed with WooCommerce 2.1). 126 $subscribe_customer = get_post_meta( $id,'ss_wc_mailchimp_opt_in', true );154 $subscribe_customer = $order->get_meta( 'ss_wc_mailchimp_opt_in', true ); 127 155 128 156 $order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id; … … 396 424 public function maybe_subscribe( $order_id ) { 397 425 398 // Get the ss_wc_mailchimp_opt_in value from the post meta ("order_custom_fields" was removed with WooCommerce 2.1). 399 $subscribe_customer = get_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', true ); 426 $order = $this->wc_get_order( $order_id ); 427 428 // Get the ss_wc_mailchimp_opt_in value from the order meta ("order_custom_fields" was removed with WooCommerce 2.1). 429 $subscribe_customer = $order->get_meta( 'ss_wc_mailchimp_opt_in', true ); 400 430 401 431 // Get the subscribe options. … … 513 543 $opt_in = isset( $_POST['ss_wc_mailchimp_opt_in'] ) ? 'yes' : 'no'; 514 544 515 update_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', $opt_in ); 545 $order = $this->wc_get_order( $order_id ); 546 547 // update_post_meta( $order_id, 'ss_wc_mailchimp_opt_in', $opt_in ); 548 549 $order->update_meta_data( 'ss_wc_mailchimp_opt_in', $opt_in ); 550 $order->save(); 551 516 552 } 517 553 } -
woocommerce-mailchimp/trunk/includes/class-ss-wc-mailchimp-plugin.php
r2940592 r2951826 16 16 * @var string 17 17 */ 18 private static $version = '2.4.1 0';18 private static $version = '2.4.12'; 19 19 20 20 /** … … 474 474 475 475 } 476 477 // Declare compatibility with custom order tables for WooCommerce. 478 add_action( 479 'before_woocommerce_init', 480 function () { 481 if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { 482 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', SS_WC_MAILCHIMP_FILE, true ); 483 } 484 } 485 ); 476 486 477 487 } //end function add_hooks -
woocommerce-mailchimp/trunk/readme.txt
r2940592 r2951826 4 4 Tags: woocommerce, mailchimp, ecommerce, email 5 5 Requires at least: 4.7.0 6 Tested up to: 6. 2.27 WC tested up to: 7.9.06 Tested up to: 6.3 7 WC tested up to: 8.0.1 8 8 Requires PHP: 5.6 9 Stable tag: 2.4.1 010 Version: 2.4.1 09 Stable tag: 2.4.12 10 Version: 2.4.12 11 11 License: GPLv3 12 12 … … 120 120 121 121 == Changelog == 122 123 #### 2.4.12 - Aug 10, 2023 124 - Support for WooCommerce HPOS (High Performance Order Storage). 125 - Bump WC tested version up to 8.0.1. 126 - Bump WP tested version up to 6.3. 127 128 #### 2.4.11 - Jul 20, 2023 129 - PHP 8+ exception bug fix - check if array key exists. 122 130 123 131 #### 2.4.10 - Jul 19, 2023 -
woocommerce-mailchimp/trunk/woocommerce-mailchimp.php
r2940592 r2951826 6 6 * Author: Saint Systems 7 7 * Author URI: https://www.saintsystems.com 8 * Version: 2.4.1 09 * WC tested up to: 7.9.08 * Version: 2.4.12 9 * WC tested up to: 8.0.1 10 10 * Text Domain: woocommerce-mailchimp 11 11 * Domain Path: languages
Note: See TracChangeset
for help on using the changeset viewer.