• Resolved akalorik

    (@akalorik)


    Ran into a couple issues with Easy Forms for MailChimp and Woocommerce integration.

    Problem #1: In checkout, the opt-in checkbox is located under the Country field (which is basically in the middle) where it should be located after the Email Address field.

    Problem #2: The opt-in checkbox for the registration form doesn’t display at all. Ideally the opt-in checkbox would show above the “Register” button.

    Any help would be greatly appreciated!

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @akalorik,

    1. We can use a filter to change the placement of the signup checkbox. Are you interested in that? Are you familiar with adding PHP snippets to your site? We can supply you with the code.

    2. Are you talking about the default WordPress registration page or the WooCommerce account registration page (located on the checkout form)? Based on the URLs you sent over, it looks like you’re referring to the WooCommerce account page. Our plugin doesn’t have an integration with the WC account page but I think that’s a good idea and will make a ticket for it.

    Get back to me when you can.

    All the best,
    Kevin.

    Thread Starter akalorik

    (@akalorik)

    Hi Kevin,

    Thanks for the quick response!

    1. A filter would be great. I’m comfortable adding PHP snippets so yes, the code for that would be helpful.

    2. You’re right, I was talking about the WooCommerce account page. If that option becomes available, I think it would be quite useful.

    Thanks,
    lori

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Lori,

    This should add the checkbox before the “Order Review” section of the checkout page:
    add_filter( 'yikes-mailchimp-wooco-integration-checkbox-checkout-fields', '__return_false' );

    If you add this snippet along with the first snippet, it will place it after the “Order Review” section:

    add_filter( 'yikes_mailchimp_wooco_integration_placement_filter', 'yikes_mailchimp_change_wooco_checkbox_placement', 10, 1 );
    function yikes_mailchimp_change_wooco_checkbox_placement( $placement ) {
    	return 'woocommerce_checkout_after_order_review'; 
    }

    Cheers,
    Kevin.

    Thread Starter akalorik

    (@akalorik)

    Thanks Kevin. The snippets worked great as-is but I think a more logical location for the checkbox would be under the email address field in the Billing details section. Would it be possible to get the snippet for that location? Thanks, lori

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Lori,

    That’s where we intend to put it w/o any filters. I think your checkout page is customized. I will need to look at your page. Give me a few minutes.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    The default behavior is to put the checkbox at the end of the billing section which is where you’re trying to put it. I am not sure how it’s ending up under the country field. Do you know if you’ve added other filters to the Checkout Billing section?

    Thread Starter akalorik

    (@akalorik)

    We do use a custom shipping plugin for international orders but I can’t see any additional filters added to the checkout billing section. I do have the ability to add a custom field to the checkout billing section. If I add a field and assign an ID, could that be used for placement?

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    I am not sure if that will work but let me explain how we’re adding the checkbox and maybe you can debug the problem on your site.

    If you remove the filters I gave you earlier, the placement of the checkbox uses WooCommerce’s woocommerce_checkout_fields filter (documentation: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/).

    We then add the checkbox to the Billing fields array.

    You can filter which checkbox fields (e.g. billing, shipping, etc.) but I don’t think you want to change that. (filter: yikes-mailchimp-wooco-integration-checkbox-placement).

    You can also filter the arguments of our field definition using this filter:
    yikes_mailchimp_wooco_integration_checkbox_field

    For some reason your site is adding our field to the middle of the billing fields section when we try to add it to the end. I think you could use WooCommerce’s woocommerce_checkout_fields filter to see all of the billing fields and the order that WC has them in.

    Does that make sense?

    Thread Starter akalorik

    (@akalorik)

    Thanks for the info Kevin. I’ll keep trying different options until I get it to work.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Woocommerce integration problems’ is closed to new replies.