• Resolved Talha

    (@talharafique)


    im trying to integrate klaviyo at the checkout page with this plugin.
    Klaviyo will only show 2 checkboxes for Email and SMS marketing
    but for some reason, nothing is showing…
    i tested with the default woo commerce checkout page and there klaviyo is working fine.

    i contacted to klaviyo support and they stated this
    “Our plugin waits for the woocommerce_checkout_fields hook to fire and then adds the email & SMS consent checkbox to the email address field and the phone number field in the billing address area

    Default woocommerce checkout page working fine: https://caffeinebullet.com/18161-2/

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Saif

    (@babylon1999)

    Hello @talharafique,

    I have no experience with the Klaviyo plugin but seems like your findings are correct, the woocommerce_checkout_fields hook is not fired when the checkout page is handled via blocks.

    I’m afraid this falls under customization which is not within our scope of support.

    If you have experience with PHP you can replace the hook above with conditional logic using is_checkout() which will work with the checkout page regardless.

    Alternatively, you can ask the Klaviyo team to add support for WooCommerce blocks by utilizing one of the mentioned hooks in this guide: https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/third-party-developers/extensibility/README.md#hooks-actions-and-filters

    Hope this helps! :‎)

    Thread Starter Talha

    (@talharafique)

    
    
    
    if (isset($klaviyo_settings['klaviyo_subscribe_checkbox']))
    {
     // Add the checkbox field
      add_filter('woocommerce_checkout_fields', 'kl_checkbox_custom_checkout_field', 11);
    
    // Post list request to Klaviyo
    
        add_action('woocommerce_checkout_update_order_meta', 'kl_add_to_list');
    }

    This is how they add checkboxes at the end of billing_feild.
    the use Filter function on ‘woocommerce_checkout_fields’ hook.

    are you not using this hook in this plugin ????

    • This reply was modified 2 years, 11 months ago by Talha. Reason: simplifies the code for better understand how they are using filter on checkout feilds

    Hello,

    While I understand you are looking for a solution, please note, development topics are out of our scope of support. However, I’m going to leave the thread open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can visit as well the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack, to get more information, or a developer to work with you.

    Kind regards.

    Hi,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Best.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Klaviyo is not Integrating on checkout page’ is closed to new replies.