Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhungate committed Aug 28, 2023
2 parents 7ef840f + 28f6018 commit d1e1385
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function mailchimp_environment_variables() {
return (object) array(
'repo' => 'master',
'environment' => 'production', // staging or production
'version' => '3.2',
'version' => '3.3',
'php_version' => phpversion(),
'wp_version' => (empty($wp_version) ? 'Unknown' : $wp_version),
'wc_version' => function_exists('WC') ? WC()->version : null,
Expand Down
12 changes: 9 additions & 3 deletions includes/api/class-mailchimp-woocommerce-transform-products.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ public function transform( $woo, $fallback_title = null ) {

$product = new MailChimp_WooCommerce_Product();

if ( class_exists( 'SitePress' ) && function_exists( 'wpml_switch_language_action' ) ) {
$get_language_args = array( 'element_id' => $woo->get_id(), 'element_type' => 'product' );
$post_language_info = apply_filters( 'wpml_element_language_details', null, $get_language_args );
wpml_switch_language_action( $post_language_info->language_code );
}

$product->setId( $woo->get_id() );
$product->setHandle( $woo->get_slug() );
$product->setHandle( urldecode($woo->get_slug() ) );
$product->setImageUrl( $this->getProductImage( $woo ) );
$product->setDescription( $woo->get_description() );
$product->setPublishedAtForeign( mailchimp_date_utc( $woo->get_date_created() ) );
$product->setTitle( $woo->get_title() );
$product->setUrl( $woo->get_permalink() );
$product->setUrl( urldecode( $woo->get_permalink() ) );

$original_vendor = '';
if ( in_array( 'woocommerce-product-vendors/woocommerce-product-vendors.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || defined( 'WC_PRODUCT_VENDORS_VERSION' ) ) {
Expand Down Expand Up @@ -153,7 +159,7 @@ public function variant( $post, $fallback_title = null ) {
}

$variant->setId( $woo->get_id() );
$variant->setUrl( $woo->get_permalink() );
$variant->setUrl( urldecode( $woo->get_permalink() ) );
$variant->setImageUrl( $this->getProductImage( $post ) );
$variant->setPrice( $woo->get_price() );
$variant->setSku( $woo->get_sku() );
Expand Down
2 changes: 1 addition & 1 deletion mailchimp-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: Mailchimp for WooCommerce
* Plugin URI: https://mailchimp.com/connect-your-store/
* Description: Connects WooCommerce to Mailchimp to sync your store data, send targeted campaigns to your customers, and sell more stuff.
* Version: 3.2
* Version: 3.3
* Author: Mailchimp
* Author URI: https://mailchimp.com
* License: GPL-2.0+
Expand Down

0 comments on commit d1e1385

Please sign in to comment.