Phone number field not sync
-
Hi,
I’m referring to an ancient post which deals with phone merge tag synchronisation. The solution was given in this Github post: https://github.com/mailchimp/mc-woocommerce/issues/725
I’ve tried to implemented the snippet in my function.php page but it returned a error:
Mailchimp says: API Request Error on 2406 in /home/provendiih/www/wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-api.php
Here is the code:
/** * @param array $merge_tags * @param MailChimp_WooCommerce_Order $order * @return array */ function mailchimp_custom_order_merge_tags($merge_tags, $order) { // the phone number can be used from either the shipping address, or the billing address. //$shipping_phone_number = (string) $order->getShippingAddress()->getPhone(); $billing_phone_number = (string) $order->getBillingAddress()->getPhone(); // this is what I would do - only supply it if the phone number is there. if (!empty($billing_phone_number)) { $merge_tags['PHONE'] = $billing_phone_number; } // return the merge tags to be submitted. return $merge_tags; } add_filter('mailchimp_get_ecommerce_merge_tags', 'mailchimp_custom_order_merge_tags', 10, 2);
Please find below my web site systme status:
` ### WordPress Environment ### WordPress address (URL): https://provendi.fr Site address (URL): https://provendi.fr WC Version: 7.7.2 REST API Version: ? 7.7.2 WC Blocks Version: ? 10.0.6 Action Scheduler Version: ? 3.5.4 Log Directory Writable: ? WP Version: 6.2.2 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.33 PHP Post Max Size: 130 MB PHP Time Limit: 165 PHP Max Input Vars: 16000 cURL Version: 7.64.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.7.42-log Max Upload Size: 128 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 7.7.2 WC Database Prefix: wor1188_ Total Database Size: 380.07MB Database Data Size: 306.32MB Database Index Size: 73.75MB wor1188_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB wor1188_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wor1188_woocommerce_order_items: Data: 0.42MB + Index: 0.14MB + Engine InnoDB wor1188_woocommerce_order_itemmeta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wor1188_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wor1188_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_actionscheduler_actions: Data: 1.06MB + Index: 0.45MB + Engine InnoDB wor1188_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_actionscheduler_logs: Data: 1.13MB + Index: 0.19MB + Engine InnoDB wor1188_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_comments: Data: 2.52MB + Index: 1.63MB + Engine InnoDB wor1188_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB wor1188_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB wor1188_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wor1188_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_hfcm_scripts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_background_task: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_icl_languages_translations: Data: 0.20MB + Index: 0.17MB + Engine InnoDB wor1188_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_icl_mo_files_domains: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wor1188_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_strings: Data: 10.52MB + Index: 19.09MB + Engine InnoDB wor1188_icl_string_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_string_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_string_positions: Data: 2.52MB + Index: 1.52MB + Engine InnoDB wor1188_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_icl_string_translations: Data: 5.52MB + Index: 3.03MB + Engine InnoDB wor1188_icl_translate: Data: 6.52MB + Index: 0.16MB + Engine InnoDB wor1188_icl_translate_job: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_icl_translations: Data: 0.08MB + Index: 0.25MB + Engine InnoDB wor1188_icl_translation_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_translation_downloads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_icl_translation_status: Data: 1.52MB + Index: 0.02MB + Engine InnoDB wor1188_icwp_wpsf_malware: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wor1188_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_lpc_inward_label: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_lpc_outward_label: Data: 151.52MB + Index: 0.11MB + Engine InnoDB wor1188_mailchimp_carts: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wor1188_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_options: Data: 8.34MB + Index: 1.16MB + Engine InnoDB wor1188_postmeta: Data: 35.55MB + Index: 16.06MB + Engine InnoDB wor1188_posts: Data: 33.52MB + Index: 0.83MB + Engine InnoDB wor1188_redirection_404: Data: 19.55MB + Index: 9.55MB + Engine InnoDB wor1188_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wor1188_redirection_logs: Data: 0.34MB + Index: 0.08MB + Engine InnoDB wor1188_sc_delivery_methods: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_sc_delivery_zones: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_simple_history: Data: 4.02MB + Index: 1.59MB + Engine InnoDB wor1188_simple_history_contexts: Data: 11.02MB + Index: 8.08MB + Engine InnoDB wor1188_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_term_relationships: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wor1188_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_toolset_associations: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wor1188_toolset_connected_elements: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_toolset_post_guid_id: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_toolset_relationships: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wor1188_toolset_type_sets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_usermeta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wor1188_useronline: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_users: Data: 0.14MB + Index: 0.14MB + Engine InnoDB wor1188_wcpdf_invoice_number: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wor1188_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wor1188_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_wc_customer_lookup: Data: 0.19MB + Index: 0.14MB + Engine InnoDB wor1188_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_wc_order_product_lookup: Data: 0.30MB + Index: 0.31MB + Engine InnoDB wor1188_wc_order_stats: Data: 0.22MB + Index: 0.20MB + Engine InnoDB wor1188_wc_order_tax_lookup: Data: 0.13MB + Index: 0.14MB + Engine InnoDB wor1188_wc_product_attributes_lookup: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wor1188_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wor1188_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_wpforms_payments: Data: 0.02MB + Index: 0.14MB + Engine InnoDB wor1188_wpforms_payment_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_wpr_rocket_cache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_wpr_rucss_used_css: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wor1188_wpstg_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wor1188_yoast_indexable: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wor1188_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wor1188_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wor1188_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wor1188_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### acf-field: 135 acf-field-group: 7 acf-options-page: 1 attachment: 289 custom_css: 1 elementor_library: 28 elementskit_content: 4 nav_menu_item: 42 oembed_cache: 1 page: 43 post: 13 product: 8 product_variation: 80 revision: 2112 shop_coupon: 1 shop_order: 1526 timeline: 6 wp_global_styles: 1 wp-types-group: 1 wpf_post_it: 6 wpforms: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (54) ### ManageWP - Worker: by GoDaddy – 4.9.17 WPML Multilingual CMS: by OnTheGoSystems – 4.6.3 WPML SEO: by OnTheGoSystems – 2.1.0 ACF Content Analysis for Yoast SEO: by Thomas Kr?ftner ViktorFroberg marol87 pekz0r angrycreative Team Yoast – 3.1 Advanced Custom Fields Multilingual: by OnTheGoSystems – 2.0.5 Admin Menu Editor: by Janis Elsts – 1.11 Advanced Custom Fields: Font Awesome: by Matt Keys – 4.0.5 Advanced Custom Fields PRO: by WP Engine – 6.1.6 Auto Image Attributes From Filename With Bulk Updater: by Arun Basil Lal – 4.3.1 Better Admin Bar: by David Vongries – 4.0.5 Colissimo shipping methods for WooCommerce: by Colissimo – 1.8.1 Custom Post Type UI: by WebDevStudios – 1.13.6 Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 4.5 Dynamic.ooo - Dynamic Content for Elementor: by Dynamic.ooo – 2.10.3 Easy Auto SKU Generator for WooCommerce: by Dan Zakirov – 1.1.2 Elementor Pro: by Elementor.com – 3.13.2 Elementor: by Elementor.com – 3.13.4 ElementsKit Lite: by Wpmet – 2.8.8 Enable Media Replace: by ShortPixel – 4.1.2 Favicon by RealFaviconGenerator: by Philippe Bernard – 1.3.27 Folders: by Premio – 2.9.2 Header Footer Code Manager: by 99robots – 1.1.32 Health Check & Troubleshooting: by La communauté WordPress – 1.6.0 Instant Images: by Darren Cooney – 5.3.1 Mailchimp for WooCommerce: by Mailchimp – 2.8.3 My Custom Functions: by Space X-Chimp – 4.51 ACF Options Page Admin: by John A. Huebner II – 3.10.0 Really Simple SSL: by Really Simple Plugins – 7.0.3 Redirection: by John Godley – 5.3.10 Sendcloud | Smart Shipping Service: by Sendcloud B.V. – 2.2.20 Simple History: by P?r Thernstr?m – 3.5.1 SVG Support: by Benbodhi – 2.5.5 Temporaire Login Without Password: by StoreApps – 1.8.2 Toolset Types: by OnTheGoSystems – 3.4.19 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.23.4 User Role Editor: by Vladimir Garagulya – 4.63.3 Systempay for WooCommerce: by Lyra Network – 1.9.4 Additional Variation Images Gallery for WooCommerce: by Emran Ahmed – 1.3.18 DHL Express Commerce: by DHL Express – 3.0.0 WooCommerce Multilingual & Multicurrency: by OnTheGoSystems – 5.1.3 PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.5.5 WooCommerce: by Automattic – 7.7.2 (update to version 7.8.0 is available) Yoast SEO: by Team Yoast – 20.8 Nested Pages: by Kyle Phillips – 3.2.4 WP Rocket | Deactivate WooCommerce Refresh Cart Fragments Cache: by WP Rocket Support Team – WP Rocket: by WP Media – 3.13.4 WP STAGING PRO - Backup Duplicator & Migration: by WP-STAGING – 4.9.0 WP-UserOnline: by Lester 'GaMerZ' Chan – 2.88.1 WPDash Notes: by WPFormation NicolasKulka WPServeur – 1.3.2 WPForms Lite: by WPForms – 1.8.2.1 WPML Media: by OnTheGoSystems – 2.7.2 WPML String Translation: by OnTheGoSystems – 3.2.5 WPForms Multilingual: by OnTheGoSystems – 0.3.3 WPS Hide Login: by WPServeur NicolasKulka wpformation – 1.9.8 ### Inactive Plugins (1) ### Shield Security: by Shield Security – 18.1.2 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Must Use Plugins (3) ### Health Check Troubleshooting Mode: by – 1.8.1 ManageWP - Worker Loader: by GoDaddy – 1.0.0 WP STAGING Optimizer: by René Hermenau – 1.5.1 ### Settings ### API Enabled: ? Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### WC Pages ### Shop base: #43 - /espace-boutique/ Cart: ? Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block. Checkout: ? Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. My account: #46 - /mon-compte/ Terms and conditions: #25 - /mentions-legales/conditions-generales/ ### Theme ### Name: Hello Elementor Child Version: 1.0.1 Author URL: https://elementor.com/ Child Theme: ? Parent Theme Name: Hello Elementor Parent Theme Version: 2.7.1 Parent Theme Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash WooCommerce Support: ? ### Templates ### Overrides: /home/provendiih/www/wp-content/plugins/woo-variation-gallery/templates/product-images.php /home/provendiih/www/wp-content/plugins/woo-variation-gallery/templates/product-thumbnails.php ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: product-block-editor minified-js new-product-management-experience product-variation-management settings Daily Cron: ? Next scheduled: 2023-06-26 13:39:52 +02:00 Options: ? Notes: 48 Onboarding: completed ### Action Scheduler ### Canceled: 2 Oldest: 2023-06-18 16:07:57 +0200 Newest: 2023-06-21 09:24:24 +0200 Complete: 766 Oldest: 2023-05-27 00:11:40 +0200 Newest: 2023-06-26 10:04:08 +0200 Failed: 154 Oldest: 2022-10-31 15:04:34 +0100 Newest: 2023-06-13 12:04:20 +0200 Pending: 3 Oldest: 2023-06-26 12:07:50 +0200 Newest: 2023-06-27 12:05:44 +0200 ### Status report information ### Generated at: 2023-06-26 11:21:10 +02:00 `
Best regards,
Micha?l
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Phone number field not sync’ is closed to new replies.