diff --git a/classes/class-pmpromc-mailchimp-api.php b/classes/class-pmpromc-mailchimp-api.php index 7204521..e905bbd 100644 --- a/classes/class-pmpromc-mailchimp-api.php +++ b/classes/class-pmpromc-mailchimp-api.php @@ -86,7 +86,9 @@ public function set_key() { ); // the datacenter that the key belongs to. - list(, self::$dc) = explode('-', self::$api_key); + if ( strpos( self::$api_key, '-' ) != false ) { + list(, self::$dc) = explode('-', self::$api_key); + } // Build the URL based on the datacenter self::$api_url = "https://" . self::$dc . ".api.mailchimp.com/3.0"; @@ -492,7 +494,7 @@ private function set_error_msg($obj, $message = NULL) global $msg; $msgt = 'error'; - + if ( !is_string($obj) && ( 200 !== wp_remote_retrieve_response_code( $obj )) ) { //there is an error and we have some kind of array or response object if(is_array($obj) && !empty($obj['response'])) { diff --git a/includes/export-csv.php b/includes/export-csv.php index cf8d723..217acbc 100644 --- a/includes/export-csv.php +++ b/includes/export-csv.php @@ -375,7 +375,7 @@ function pmpro_transmit_content( $csv_fh, $filename, $headers = array() ) { { echo esc_html( str_repeat('-', 75 ) ) . "
\n"; echo 'Please open a support case and paste in the warnings/errors you see above this text to\n '; - echo 'the Paid Memberships Pro support forum
\n'; + echo 'the Paid Memberships Pro support forum
\n'; echo esc_html( str_repeat("=", 75) ) . "
\n"; echo esc_html( file_get_contents($filename) ); echo esc_html( str_repeat("=", 75) ) . "
\n"; diff --git a/includes/functions.php b/includes/functions.php index 730f04a..6c1ae09 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -185,52 +185,74 @@ function pmpromc_additional_lists_on_checkout() { $display_modifier = empty( $pmpro_review ) ? '' : 'style="display: none;"'; ?> -
> -
-

- - 1 ) { - esc_html_e( 'Join one or more of our mailing lists.', 'pmpro-mailchimp' ); - } else { - esc_html_e( 'Join our mailing list.', 'pmpro-mailchimp' ); - } - ?> - -

-
- ID ) ) { - $additional_lists_selected = get_user_meta( $current_user->ID, 'pmpromc_additional_lists', true ); - } else { - $additional_lists_selected = array(); - } - $count = 0; - foreach ( $additional_lists_array as $key => $additional_list ) { - $count++; - ?> - id, $additional_lists_selected ) ); - }; - ?> - /> -
- -
-
+
+
> +
+ +

+ 1 ) { + esc_html_e( 'Opt-In Mailing Lists', 'pmpro-mailchimp' ); + } else { + esc_html_e( 'Opt-In Mailing List', 'pmpro-mailchimp' ); + } + ?> +

+
+
+
+

+ 1 ) { + esc_html_e( 'Join one or more of our mailing lists.', 'pmpro-mailchimp' ); + } else { + esc_html_e( 'Join our mailing list.', 'pmpro-mailchimp' ); + } + ?> +

+
+
+
    + ID ) ) { + $additional_lists_selected = get_user_meta( $current_user->ID, 'pmpromc_additional_lists', true ); + } else { + $additional_lists_selected = array(); + } + $count = 0; + foreach ( $additional_lists_array as $key => $additional_list ) { + $count++; + ?> +
  • + + id, $additional_lists_selected ) ); + }; + ?> + /> + + +
  • + +
+
+
+
+
+
- -
- - ID, 'pmpromc_additional_lists', true ); + ?> +
+
+ +

+ 1 ) { + esc_html_e( 'Opt-In Mailing Lists', 'pmpro-mailchimp' ); + } else { + esc_html_e( 'Opt-In Mailing List', 'pmpro-mailchimp' ); + } + ?> +

+
+
+
+

+ 1 ) { + esc_html_e( 'Join one or more of our mailing lists.', 'pmpro-mailchimp' ); + } else { + esc_html_e( 'Join our mailing list.', 'pmpro-mailchimp' ); + } + ?> +

+
+
+
    + ID, 'pmpromc_additional_lists', true ); - if ( isset( $user_additional_audiences ) ) { - $selected_audiences = $user_additional_audiences; - } else { - $selected_audiences = array(); - } + if ( isset( $user_additional_audiences ) ) { + $selected_audiences = $user_additional_audiences; + } else { + $selected_audiences = array(); + } - echo ''; - foreach ( $additional_audiences_info as $audience_arr ) { - $checked_modifier = ( is_array( $selected_audiences ) && in_array( $audience_arr['id'], $selected_audiences ) ) ? ' checked' : ''; - echo( "" ); - echo( "
    " ); - } ?> -
- '; + foreach ( $additional_audiences_info as $audience_arr ) { + $checked_modifier = ( is_array( $selected_audiences ) && in_array( $audience_arr['id'], $selected_audiences ) ) ? ' checked' : ''; + ?> +
  • + + > + + +
  • + + +
    +
    + +

    -

    PMPLEVEL and PMPLEVELID merge field in Mailchimp. This will only affect new or updated members. You must import this data into MailChimp for existing members.", 'pmpro-mailchimp') ) ;?> .

    +

    PMPLEVEL and PMPLEVELID merge field in Mailchimp. This will only affect new or updated members. You must import this data into MailChimp for existing members.", 'pmpro-mailchimp') ) ;?> .


    @@ -101,7 +101,7 @@ function pmpromc_options_page()
  • Choose an Audience -> Add Members -> Import Members -> CSV or tab-delimited text file.', 'pmpro-mailchimp');?>
  • -
  • PMPLEVEL and PMPLEVELID. The fields should have those exact names in all uppercase letters.', 'pmpro-mailchimp');?> +
  • PMPLEVEL and PMPLEVELID. The fields should have those exact names in all uppercase letters.', 'pmpro-mailchimp') );?>
  • @@ -109,7 +109,7 @@ function pmpromc_options_page()

    click here to read our documentation on importing existing members into Mailchimp.', 'pmpro-mailchimp'), 'http://www.paidmembershipspro.com/import-level-name-id-existing-members-using-new-merge-fields-pmpro-mailchimp-v2-0/' ) ); + echo wp_kses_post( sprintf( __('For more detailed instructions and screenshots, click here to read our documentation on importing existing members into Mailchimp.', 'pmpro-mailchimp'), 'https://www.paidmembershipspro.com/import-level-name-id-existing-members-using-new-merge-fields-pmpro-mailchimp-v2-0/' ) ); ?>

    diff --git a/readme.txt b/readme.txt index e1cac3f..adf5e4a 100755 --- a/readme.txt +++ b/readme.txt @@ -55,7 +55,7 @@ Please post it in the issues section of GitHub and we'll fix it as soon as we ca = I need help installing, configuring, or customizing the plugin. = -Please visit [our support site at https://www.paidmembershipspro.com](http://www.paidmembershipspro.com/) for more documentation and our support forums. +Please visit [our support site at https://www.paidmembershipspro.com](https://www.paidmembershipspro.com/) for more documentation and our support forums. == Screenshots ==