• Resolved Phil Donaldson

    (@philanyware)


    Hi,

    I’m trying to create a custom merge variable to use with the WooCommerce Follow-up Emails extension. I copied Woo’s example from this page in the docs:
    https://docs.woocommerce.com/document/automated-follow-up-emails-docs/custom-variables/

    But my variable is not getting a value in the emails, it always show as {testvar} in the email instead of ‘test value’.
    Any ideas how to get the variable to be evaluated in the email?

    Here’s my code (added to functions.php for the theme):

    // Add ‘group_name’ custom variable to follow-up module so we can use it in emails

    add_filter( ‘fue_variable_replacements’, ‘fue_register_variable_replacements’, 10, 3);function fue_register_variable_replacements( $variables, $queue_item, $fue_email ) {

    $variables[‘testvar’] = ‘test value’;

    return $variables;

    }

    Thanks,
    Phil

    
    ### WordPress Environment ###
    
    Home URL: https://gen.anyware.co.nz/silkliving
    Site URL: https://gen.anyware.co.nz/silkliving
    WC Version: 3.4.5
    Log Directory Writable: ?
    WP Version: 4.9.8
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.1.21 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.61.0
    OpenSSL/1.0.2p
    
    SUHOSIN Installed: –
    MySQL Version: 5.6.40
    Max Upload Size: 4 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ? Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 3.4.5
    WC Database Prefix: wppk_
    MaxMind GeoIP Database: ?
    Total Database Size: 354.48MB
    Database Data Size: 175.23MB
    Database Index Size: 179.25MB
    wppk_woocommerce_sessions: Data: 0.06MB + Index: 0.02MB
    wppk_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
    wppk_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
    wppk_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB
    wppk_woocommerce_order_items: Data: 2.52MB + Index: 0.48MB
    wppk_woocommerce_order_itemmeta: Data: 5.52MB + Index: 6.03MB
    wppk_woocommerce_tax_rates: Data: 0.09MB + Index: 0.09MB
    wppk_woocommerce_tax_rate_locations: Data: 0.06MB + Index: 0.06MB
    wppk_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
    wppk_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
    wppk_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
    wppk_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
    wppk_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
    wppk_woocommerce_log: Data: 0.02MB + Index: 0.02MB
    wppk_ariadminer_connections: Data: 0.02MB + Index: 0.00MB
    wppk_aws_cache: Data: 0.02MB + Index: 0.00MB
    wppk_aws_index: Data: 1.52MB + Index: 0.00MB
    wppk_commentmeta: Data: 0.28MB + Index: 0.22MB
    wppk_comments: Data: 1.04MB + Index: 0.39MB
    wppk_failed_jobs: Data: 0.02MB + Index: 0.00MB
    wppk_followup_coupons: Data: 0.02MB + Index: 0.03MB
    wppk_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB
    wppk_followup_customers: Data: 0.02MB + Index: 0.06MB
    wppk_followup_customer_carts: Data: 0.02MB + Index: 0.03MB
    wppk_followup_customer_notes: Data: 0.02MB + Index: 0.03MB
    wppk_followup_customer_orders: Data: 0.02MB + Index: 0.02MB
    wppk_followup_email_excludes: Data: 0.02MB + Index: 0.05MB
    wppk_followup_email_logs: Data: 0.02MB + Index: 0.05MB
    wppk_followup_email_orders: Data: 0.05MB + Index: 0.09MB
    wppk_followup_email_tracking: Data: 0.02MB + Index: 0.08MB
    wppk_followup_followup_history: Data: 0.19MB + Index: 0.05MB
    wppk_followup_order_categories: Data: 0.02MB + Index: 0.03MB
    wppk_followup_order_items: Data: 0.02MB + Index: 0.05MB
    wppk_followup_subscribers: Data: 0.02MB + Index: 0.03MB
    wppk_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB
    wppk_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB
    wppk_groups_capability: Data: 0.02MB + Index: 0.03MB
    wppk_groups_group: Data: 0.02MB + Index: 0.02MB
    wppk_groups_group_capability: Data: 0.02MB + Index: 0.02MB
    wppk_groups_user_capability: Data: 0.02MB + Index: 0.02MB
    wppk_groups_user_group: Data: 0.45MB + Index: 0.31MB
    wppk_ip_geo_block_cache: Data: 0.02MB + Index: 0.02MB
    wppk_ip_geo_block_logs: Data: 0.30MB + Index: 0.03MB
    wppk_ip_geo_block_stat: Data: 0.02MB + Index: 0.00MB
    wppk_links: Data: 0.00MB + Index: 0.00MB
    wppk_loginizer_logs: Data: 0.00MB + Index: 0.00MB
    wppk_mailchimp_carts: Data: 0.02MB + Index: 0.00MB
    wppk_options: Data: 1.74MB + Index: 0.18MB
    wppk_pimwick_gift_card: Data: 0.02MB + Index: 0.02MB
    wppk_pimwick_gift_card_activity: Data: 0.02MB + Index: 0.02MB
    wppk_postmeta: Data: 17.63MB + Index: 8.70MB
    wppk_posts: Data: 4.04MB + Index: 0.93MB
    wppk_premmerce_search_words: Data: 0.02MB + Index: 0.00MB
    wppk_queue: Data: 0.02MB + Index: 0.00MB
    wppk_redirection_404: Data: 0.85MB + Index: 0.14MB
    wppk_redirection_groups: Data: 0.00MB + Index: 0.00MB
    wppk_redirection_items: Data: 0.03MB + Index: 0.04MB
    wppk_redirection_logs: Data: 0.01MB + Index: 0.01MB
    wppk_smush_dir_images: Data: 0.02MB + Index: 0.03MB
    wppk_termmeta: Data: 0.06MB + Index: 0.06MB
    wppk_terms: Data: 0.01MB + Index: 0.03MB
    wppk_term_relationships: Data: 0.09MB + Index: 0.17MB
    wppk_term_taxonomy: Data: 0.02MB + Index: 0.01MB
    wppk_usermeta: Data: 16.43MB + Index: 11.41MB
    wppk_users: Data: 1.23MB + Index: 1.29MB
    wppk_wc_download_log: Data: 0.02MB + Index: 0.03MB
    wppk_wc_webhooks: Data: 0.02MB + Index: 0.02MB
    wppk_wps_hit: Data: 0.02MB + Index: 0.14MB
    wppk_wps_index: Data: 29.56MB + Index: 56.64MB
    wppk_wps_key: Data: 0.34MB + Index: 0.28MB
    wppk_wps_object_type: Data: 0.02MB + Index: 0.08MB
    wppk_wps_query: Data: 0.02MB + Index: 0.02MB
    wppk_wps_uri: Data: 0.02MB + Index: 0.02MB
    wppk_wps_user_agent: Data: 0.02MB + Index: 0.02MB
    wppk_yoast_seo_links: Data: 0.05MB + Index: 0.02MB
    wppk_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB
    wpstg0_ariadminer_connections: Data: 0.02MB + Index: 0.00MB
    wpstg0_aws_cache: Data: 0.05MB + Index: 0.00MB
    wpstg0_aws_index: Data: 1.52MB + Index: 0.00MB
    wpstg0_commentmeta: Data: 0.28MB + Index: 0.25MB
    wpstg0_comments: Data: 1.04MB + Index: 0.40MB
    wpstg0_failed_jobs: Data: 0.02MB + Index: 0.00MB
    wpstg0_followup_coupons: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB
    wpstg0_followup_customers: Data: 0.02MB + Index: 0.06MB
    wpstg0_followup_customer_carts: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_customer_notes: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_customer_orders: Data: 0.02MB + Index: 0.02MB
    wpstg0_followup_email_excludes: Data: 0.02MB + Index: 0.05MB
    wpstg0_followup_email_logs: Data: 0.02MB + Index: 0.05MB
    wpstg0_followup_email_orders: Data: 0.05MB + Index: 0.09MB
    wpstg0_followup_email_tracking: Data: 0.02MB + Index: 0.08MB
    wpstg0_followup_followup_history: Data: 0.19MB + Index: 0.05MB
    wpstg0_followup_order_categories: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_order_items: Data: 0.02MB + Index: 0.05MB
    wpstg0_followup_subscribers: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB
    wpstg0_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB
    wpstg0_groups_capability: Data: 0.02MB + Index: 0.03MB
    wpstg0_groups_group: Data: 0.02MB + Index: 0.02MB
    wpstg0_groups_group_capability: Data: 0.02MB + Index: 0.02MB
    wpstg0_groups_user_capability: Data: 0.02MB + Index: 0.02MB
    wpstg0_groups_user_group: Data: 1.52MB + Index: 0.50MB
    wpstg0_ip_geo_block_cache: Data: 0.02MB + Index: 0.02MB
    wpstg0_ip_geo_block_logs: Data: 0.30MB + Index: 0.03MB
    wpstg0_ip_geo_block_stat: Data: 0.02MB + Index: 0.00MB
    wpstg0_links: Data: 0.00MB + Index: 0.00MB
    wpstg0_loginizer_logs: Data: 0.00MB + Index: 0.00MB
    wpstg0_mailchimp_carts: Data: 0.02MB + Index: 0.00MB
    wpstg0_options: Data: 4.44MB + Index: 0.19MB
    wpstg0_pimwick_gift_card: Data: 0.02MB + Index: 0.02MB
    wpstg0_pimwick_gift_card_activity: Data: 0.02MB + Index: 0.02MB
    wpstg0_postmeta: Data: 18.53MB + Index: 10.13MB
    wpstg0_posts: Data: 4.04MB + Index: 0.74MB
    wpstg0_premmerce_search_words: Data: 0.02MB + Index: 0.00MB
    wpstg0_queue: Data: 0.02MB + Index: 0.00MB
    wpstg0_redirection_404: Data: 0.94MB + Index: 0.13MB
    wpstg0_redirection_groups: Data: 0.00MB + Index: 0.00MB
    wpstg0_redirection_items: Data: 0.03MB + Index: 0.04MB
    wpstg0_redirection_logs: Data: 0.01MB + Index: 0.01MB
    wpstg0_smush_dir_images: Data: 0.02MB + Index: 0.03MB
    wpstg0_termmeta: Data: 0.06MB + Index: 0.06MB
    wpstg0_terms: Data: 0.01MB + Index: 0.03MB
    wpstg0_term_relationships: Data: 0.09MB + Index: 0.18MB
    wpstg0_term_taxonomy: Data: 0.02MB + Index: 0.02MB
    wpstg0_usermeta: Data: 16.66MB + Index: 12.55MB
    wpstg0_users: Data: 1.23MB + Index: 1.00MB
    wpstg0_wc_download_log: Data: 0.02MB + Index: 0.03MB
    wpstg0_wc_webhooks: Data: 0.02MB + Index: 0.02MB
    wpstg0_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
    wpstg0_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
    wpstg0_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB
    wpstg0_woocommerce_log: Data: 0.02MB + Index: 0.02MB
    wpstg0_woocommerce_order_itemmeta: Data: 5.52MB + Index: 6.03MB
    wpstg0_woocommerce_order_items: Data: 2.52MB + Index: 0.47MB
    wpstg0_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
    wpstg0_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
    wpstg0_woocommerce_sessions: Data: 0.09MB + Index: 0.02MB
    wpstg0_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
    wpstg0_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
    wpstg0_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
    wpstg0_woocommerce_tax_rates: Data: 0.09MB + Index: 0.09MB
    wpstg0_woocommerce_tax_rate_locations: Data: 0.06MB + Index: 0.06MB
    wpstg0_wps_hit: Data: 0.02MB + Index: 0.14MB
    wpstg0_wps_index: Data: 29.56MB + Index: 55.64MB
    wpstg0_wps_key: Data: 0.34MB + Index: 0.28MB
    wpstg0_wps_object_type: Data: 0.02MB + Index: 0.08MB
    wpstg0_wps_query: Data: 0.02MB + Index: 0.02MB
    wpstg0_wps_uri: Data: 0.02MB + Index: 0.02MB
    wpstg0_wps_user_agent: Data: 0.02MB + Index: 0.02MB
    wpstg0_yoast_seo_links: Data: 0.05MB + Index: 0.02MB
    wpstg0_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB
    
    ### Post Type Counts ###
    
    attachment: 1471
    customize_changeset: 19
    flamingo_contact: 96
    follow_up_email: 2
    nav_menu_item: 79
    page: 24
    post: 16
    product: 148
    product_variation: 1215
    revision: 236
    scheduled-action: 56
    shop_coupon: 25
    shop_order: 5184
    shop_order_refund: 1649
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?Error messages should not be shown to visitors.
    
    ### Active Plugins (32) ###
    
    Advanced Woo Search: by ILLID – 1.51
    All-in-One WP Migration: by ServMask – 6.76
    Disable XML-RPC: by Philip Erb – 1.0.1
    Genesis Connect for WooCommerce: by StudioPress – 1.0
    Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 7.2.0
    Groups WooCommerce: by itthinx – 1.12.2
    Groups: by itthinx – 2.3.1
    Imsanity: by Shane Bishop – 2.4.0
    IP Geo Block: by tokkonopapa – 3.0.14
    Max Mega Menu: by megamenu.com – 2.5.2
    Post SMTP: by Jason Hendriks
    Yehuda Hassine – 1.9.4
    
    Purchase Order WooCommerce Addon: by Syed Nazrul Hassan – 1.0 – Not tested with the active version of WooCommerce
    PW WooCommerce Gift Cards: by Pimwick
    LLC – 1.32
    
    Redirection: by John Godley – 3.5
    Page Builder by SiteOrigin: by SiteOrigin – 2.8.2
    SiteOrigin Widgets Bundle: by SiteOrigin – 1.12.1
    Use Any Font: by Dinesh Karki – 4.9.2
    User Groups Status: by Rohit – 1.0.0
    W3 Total Cache: by Frederick Townes – 0.9.7
    WooCommerce Manual Payment: by bfl – 1.13.0
    WooCommerce Currency Converter: by WooCommerce – 1.6.11 – 1.6.12 is available
    Follow-Up Emails: by WooCommerce – 4.8.0 – 4.8.1 is available
    WooCommerce Stripe Gateway: by WooCommerce – 4.1.10
    WooCommerce Group Coupons: by itthinx – 1.8.1
    WooCommerce Print Invoices/Packing Lists: by SkyVerge – 3.6.0
    WooCommerce Product Search: by itthinx – 2.8.0 – 2.9.0 is available
    WooCommerce Sequential Order Numbers: by SkyVerge – 1.8.3
    WooCommerce Xero Integration: by WooCommerce – 1.7.14
    WooCommerce: by Automattic – 3.4.5
    Yoast SEO: by Team Yoast – 8.2.1
    Smush: by WPMU DEV – 2.8.1
    WP Staging: by WP-Staging – 2.3.7
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: NZD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    pw gift card (pw-gift-card)
    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)
    
    ### WC Pages ###
    
    Shop base: #9162 - /shop/
    Cart: #21 - /cart/
    Checkout: #19 - /checkout/
    My account: #23 - /create-account/
    Terms and conditions: #9105 - /terms-and-conditions/
    
    ### Theme ###
    
    Name: Atmosphere Pro
    Version: 1.1.2
    Author URL: https://www.studiopress.com/
    Child Theme: ?
    Parent Theme Name: Genesis
    Parent Theme Version: 2.6.1
    Parent Theme Author URL: https://www.studiopress.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    • This topic was modified 6 years, 1 month ago by Phil Donaldson. Reason: Add wp status
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @philanyware

    It doesn’t appear you’re getting the development you need here. Feel free to join our WooCommerce Developers Slack channel to team up with another developer there:

    https://woocommerceslack.herokuapp.com

    Hopefully, this gets you going in the right direction to get the job done!

    Thread Starter Phil Donaldson

    (@philanyware)

    In case someone else has the same problem…

    It turns out I didn’t read the instructions very well. This was an action and not a filter…

    add_action( ‘fue_before_variable_replacements’, ‘fuekb_register_variable_replacements’, 10, 4);

    function fuekb_register_variable_replacements( $var, $email_data, $fue_email, $queue_item ) {
    $variables[‘testvar’] = ‘test value’;
    $var->register( $variables );
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Follow-up Email variable not evaluating’ is closed to new replies.