• Hello,

    I need the hook for add the checkbox and label of mailchimp registration before my submit button in checkout template

    Like:

    add_action( ‘woocommerce_checkout_order_review’, ‘yith_mailchimp_code’, 20 );

    Coukd somebody help me?
    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    hope you are doing well! ??

    If you want to change the position, you can do it in the plugin settings as you can see on this image.

    This option changes the hook depending on your selection, in your case, you need to use the “Above “Review order” total”.

    Could you check it and let us know any news, please?

    Have a nice day!

    Thread Starter realcode

    (@realcode)

    Hello,

    thank you for your reply.
    Yeah I saw this option, but it doesn’t work fine for me (my thmeme).
    Isn’t there a hook that i could use to place the position individually?

    Thank you very much.

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    Unfortunately, it’s not possible, the hooks used by the plugin are added dynamically depending on the selected option. We suggest you to contact your theme support and ask them if is possible to add the default WooCommerce hooks to the product page template.

    Anyway, we have created a custom code for you, that modified the behavior of the option. To try this, you have to add the next code in the functions.php of your active theme.

    if ( ! function_exists('yith_wcmc_checkbox_position_hook_custom' ) ) {
        function yith_wcmc_checkbox_position_hook_custom( $positions_hook_relation ){
            $positions_hook_relation = apply_filters( 'yith_wcmc_checkbox_position_hook', array(
                'above_customer' => 'woocommerce_checkout_order_review',
                'below_customer' => 'woocommerce_checkout_after_customer_details',
                'above_place_order' => 'woocommerce_review_order_before_submit',
                'below_place_order' => 'woocommerce_review_order_after_submit',
                'above_total' => 'woocommerce_review_order_before_order_total',
                'above_billing' => 'woocommerce_checkout_billing',
                'below_billing' => 'woocommerce_after_checkout_billing_form',
                'above_shipping' => 'woocommerce_checkout_shipping'
            ));
            return $positions_hook_relation;
        }
    }
    add_filter( 'yith_wcmc_checkbox_position_hook', 'yith_wcmc_checkbox_position_hook_custom', 10, 1 );

    With this code, the plugin option “Above customer details” will use the hook you need “woocommerce_checkout_order_review”.

    Could you check it and let us know any news, please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hook for Checkbox in Checkout’ is closed to new replies.