diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b0bfaec7..0fe9f2c8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,20 @@ == Changelog == += 3.5 = +* Support for updated Mailchimp attribution methods +* Adds a Continue to Mailchimp CTA to Woo Dashboard UI +* Tested for WooCommerce v8.4 compatibility += 3.4 = +* Fix rest_url function for installs that are not using wp_rewrite +* Strict type-checks before calling unserialize +* Better wp-cli detection for support +* Fix webhook validation during plugin updates += 3.3 = +* Performance enhancement: Removing excessive double opt-in api calls during initial sync +* Fix for translated product issue +* Fix for ongoing sync settings failing when double opt-in enabled +* Fix for permalink conflicting with Webhook creation +* Fix for GDPR Marketing Preferences not captured on checkout +* Word-wrap version update to 1.2.3 in blocks = 3.2 = * Released: 08-21-2023 * fix for too few arguments to function MailChimp_Service::handleOrderUpdate() diff --git a/README.txt b/README.txt index ec3c99b2..1596dd1a 100644 --- a/README.txt +++ b/README.txt @@ -3,11 +3,11 @@ Contributors: ryanhungate, Mailchimp Tags: ecommerce,email,workflows,mailchimp Donate link: https://mailchimp.com Requires at least: 4.9 -Tested up to: 6.3 -Stable tag: 3.2 +Tested up to: 6.4 +Stable tag: 3.5 Requires PHP: 7.4 WC requires at least: 4.2 -WC tested up to: 8.0 +WC tested up to: 8.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Connect your store to your Mailchimp audience to track sales, create targeted emails, send abandoned cart emails, and more. @@ -78,9 +78,7 @@ At this time, the synchronization of product categories from WooCommerce to Mail If you are unable to sync or connect with Mailchimp, you can open a ticket on our [Github plugin page](https://github.com/mailchimp/mc-woocommerce/issues). Please provide the version of the plugin and PHP you're using, any fatal errors in the WooCommerce logs (WooCommerce -> Status -> Logs) you're seeing, along with relevant information to the problem you're experiencing. == Changelog == -= 3.2 = -* Released: 08-21-2023 -* fix for too few arguments to function MailChimp_Service::handleOrderUpdate() -* update to lateset version of core blocks for the site editor -* adds the plugin icon back to wp-admin menu -* adds automatic webhook cleaning += 3.5 = +* Support for updated Mailchimp attribution methods +* Adds a Continue to Mailchimp CTA to Woo Dashboard UI +* Tested for WooCommerce v8.4 compatibility diff --git a/admin/class-mailchimp-woocommerce-admin.php b/admin/class-mailchimp-woocommerce-admin.php index 58a52cf1..37496588 100644 --- a/admin/class-mailchimp-woocommerce-admin.php +++ b/admin/class-mailchimp-woocommerce-admin.php @@ -112,7 +112,7 @@ public function enqueue_styles( $hook ) { if ( get_bloginfo( 'version' ) < '5.3' ) { wp_enqueue_style( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings-5.2.css', array(), $this->version ); } - wp_enqueue_style( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version ); + wp_enqueue_style( $this->plugin_name . '-settings', plugin_dir_url( __FILE__ ) . 'css/mailchimp-woocommerce-admin-settings.css', array(), $this->version . '.01' ); wp_style_add_data( $this->plugin_name . '-settings', 'rtl', 'replace' ); } } @@ -364,7 +364,15 @@ public function options_update() { * Displays notice when plugin is installed but not yet configured / connected to Mailchimp. */ public function initial_notice() { - if ( ! mailchimp_is_configured() ) { + global $pagenow; + + // if we're on the mc admin setup pages - don't do anything + if ($pagenow == 'admin.php' && isset( $_GET ) && isset( $_GET['page'] ) && 'mailchimp-woocommerce' === $_GET['page'] ) { + return null; + } + + // if they've logged in oauth - but have not selected a list id yet - show the admin notice. + if ( (bool) (mailchimp_get_api_key() && !mailchimp_get_list_id())) { $class = 'notice notice-warning is-dismissible'; $message = sprintf( /* translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag */ @@ -546,7 +554,7 @@ public function update_plugin_check() { $this->update_db_check(); - mailchimp_log('webhooks', 'Deleted old plugin webhooks'); + mailchimp_log('webhooks', 'Ran plugin updater'); } } @@ -2119,7 +2127,9 @@ public function defineWebHooks() { */ protected function adminOnlyMiddleware( $message = "You're not allowed to do this" ) { if ( ! current_user_can( mailchimp_get_allowed_capability() ) ) { - wp_send_json_error( array( 'message' => $message ) ); + $error = new \Exception(); + mailchimp_debug('admin', 'tracing admin json error', $error->getTrace()); + wp_send_json_error( array( 'message' => $message, 'from' => 'mailchimp-for-woocommerce' ) ); } return true; } diff --git a/admin/css/mailchimp-woocommerce-admin-settings.css b/admin/css/mailchimp-woocommerce-admin-settings.css index 036f75d7..11b9e595 100644 --- a/admin/css/mailchimp-woocommerce-admin-settings.css +++ b/admin/css/mailchimp-woocommerce-admin-settings.css @@ -125,6 +125,12 @@ a.button.back-step { padding-left: 58px; } +.mc-woocommerce-settings-subtitles-row { + display: flex; + align-items: center; + justify-content: space-between; +} + .mc-woocommerce-settings-subtitles { font-family: "proxima-nova", Arial, Helvetica, sans-serif; font-size: 22px !important; @@ -1228,6 +1234,14 @@ a.button.create-account { background: linear-gradient(0deg, rgba(255,255,255,0) 10%, rgba(255,255,255,0.6964986678265056) 36%, rgba(255,255,255,1) 100%); } +@media screen and (max-width: 960px) { + .mc-woocommerce-settings-subtitles-row { + flex-direction: column; + align-items: flex-start; + margin-bottom: 1.69em; + } +} + @media screen and (max-width: 782px) { .tab-content-wrapper, .notices-content-wrapper { padding: 0 1em; diff --git a/admin/partials/mailchimp-woocommerce-admin-tabs.php b/admin/partials/mailchimp-woocommerce-admin-tabs.php index 784bac1b..272a531a 100644 --- a/admin/partials/mailchimp-woocommerce-admin-tabs.php +++ b/admin/partials/mailchimp-woocommerce-admin-tabs.php @@ -162,55 +162,60 @@ -

- +

+ array(), - ); + $allowed_html = array( + 'br' => array(), + ); - if ( 'api_key' === $active_tab ) { - echo wp_kses( __( 'Add Mailchimp for WooCommerce to build custom segments, send automations, and track purchase activity in Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); - } + if ( 'api_key' === $active_tab ) { + echo wp_kses( __( 'Add Mailchimp for WooCommerce to build custom segments, send automations, and track purchase activity in Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); + } - if ( 'store_info' === $active_tab && $has_valid_api_key ) { - if ( $show_sync_tab ) { - echo wp_kses( __( 'WooCommerce store and location', 'mailchimp-for-woocommerce' ), $allowed_html ); - } else { - echo wp_kses( __( 'Please provide a bit of information about your WooCommerce store', 'mailchimp-for-woocommerce' ), $allowed_html ); + if ( 'store_info' === $active_tab && $has_valid_api_key ) { + if ( $show_sync_tab ) { + echo wp_kses( __( 'WooCommerce store and location', 'mailchimp-for-woocommerce' ), $allowed_html ); + } else { + echo wp_kses( __( 'Please provide a bit of information about your WooCommerce store', 'mailchimp-for-woocommerce' ), $allowed_html ); + } } - } - if ( 'newsletter_settings' === $active_tab ) { - if ( $show_sync_tab ) { - echo wp_kses( __( 'Campaign and messaging settings', 'mailchimp-for-woocommerce' ), $allowed_html ); - } else { - if ( $only_one_list ) { - echo wp_kses( __( 'Please apply your audience settings.', 'mailchimp-for-woocommerce' ), $allowed_html ); + if ( 'newsletter_settings' === $active_tab ) { + if ( $show_sync_tab ) { + echo wp_kses( __( 'Campaign and messaging settings', 'mailchimp-for-woocommerce' ), $allowed_html ); } else { - echo wp_kses( __( 'Please apply your audience settings. ', 'mailchimp-for-woocommerce' ), $allowed_html ); - echo wp_kses( __( 'If you don’t have an audience, you can choose to create one', 'mailchimp-for-woocommerce' ), $allowed_html ); + if ( $only_one_list ) { + echo wp_kses( __( 'Please apply your audience settings.', 'mailchimp-for-woocommerce' ), $allowed_html ); + } else { + echo wp_kses( __( 'Please apply your audience settings. ', 'mailchimp-for-woocommerce' ), $allowed_html ); + echo wp_kses( __( 'If you don’t have an audience, you can choose to create one', 'mailchimp-for-woocommerce' ), $allowed_html ); + } } } - } - if ( 'sync' === $active_tab && $show_sync_tab ) { - if ( mailchimp_is_done_syncing() ) { - echo wp_kses( __( 'Success! You are connected to Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); - } else { - echo wp_kses( __( 'Your WooCommerce store is syncing to Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); + if ( 'sync' === $active_tab && $show_sync_tab ) { + if ( mailchimp_is_done_syncing() ) { + echo wp_kses( __( 'Success! You are connected to Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); + } else { + echo wp_kses( __( 'Your WooCommerce store is syncing to Mailchimp', 'mailchimp-for-woocommerce' ), $allowed_html ); + } } - } - if ( 'logs' === $active_tab && $show_sync_tab ) { - echo wp_kses( __( 'Log events from the Mailchimp plugin', 'mailchimp-for-woocommerce' ), $allowed_html ); - } + if ( 'logs' === $active_tab && $show_sync_tab ) { + echo wp_kses( __( 'Log events from the Mailchimp plugin', 'mailchimp-for-woocommerce' ), $allowed_html ); + } - if ( 'plugin_settings' === $active_tab && $show_sync_tab ) { - echo wp_kses( __( 'Connection settings', 'mailchimp-for-woocommerce' ), $allowed_html ); - } - ?> -

+ if ( 'plugin_settings' === $active_tab && $show_sync_tab ) { + echo wp_kses( __( 'Connection settings', 'mailchimp-for-woocommerce' ), $allowed_html ); + } + ?> +

+ + Continue to Mailchimp + +