• Resolved marusche

    (@marusche)


    Hi,

    i would like to remove the Position of the Terms checkbox from the Top of the review to the orderbutton. I found something for the function.php
    But the remove_action doesnt work so I have the Terms checkbox 2 times.
    I think its the wrong code for the remove_action.

    add_action( ‘init’, ‘my_child_move_legal_checkboxes’, 50 );

    function my_child_move_legal_checkboxes() {
    // Remove
    remove_action( ‘woocommerce_review_order_after_payment’, ‘woocommerce_gzd_template_render_checkout_checkboxes’, 10 );
    // Right before submit button
    add_action( ‘woocommerce_gzd_review_order_before_submit’, ‘woocommerce_gzd_template_render_checkout_checkboxes’, 10 );
    }

    Maybe you can help me with this.

    Regards

    Angela

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @marusche,

    Fluid Checkout make similar changes at a higher priority (100) for the compatibility with the Germanized plugin.

    Try changing the first line of your code setting a higher priority for the init hook as below:

    add_action( ‘init’, ‘my_child_move_legal_checkboxes’, 300 );

    I’m closing this ticket for now. If you need further assistance related to this issue, simply reply to this message to re-open it.

    Best,
    Diego.

    Thread Starter marusche

    (@marusche)

    Hi, this change dont work. I think this is wrong:
    remove_action( ‘woocommerce_review_order_after_payment’, ‘woocommerce_gzd_template_render_checkout_checkboxes’, 10 );
    (The bold type part).
    It is difficult for me to find out which Plugin generate this part.
    Woocomerce, Germanized or Fluid Checkout. I searched through the templates for many time.

    Thanks and best regards.

    Angela

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @marusche,

    Right.

    The actual code for the checkboxes is generated by Germanized, but Fluid Checkout also changes the position of these checkboxes so you’ll need to also remove the action hook from the position where Fluid Checkout sets it to.

    Here is your code revised (not tested):

    add_action( 'init', 'my_child_move_legal_checkboxes', 300 );
    function my_child_move_legal_checkboxes() {
         // Remove
         remove_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_render_checkout_checkboxes', 10 );
         remove_action( 'woocommerce_checkout_before_order_review', 'woocommerce_gzd_template_render_checkout_checkboxes', 10 );
         // Right before submit button
         add_action( 'woocommerce_gzd_review_order_before_submit', 'woocommerce_gzd_template_render_checkout_checkboxes', 10 );
    }

    I’m closing this ticket for now. If you need further assistance related to this issue, simply reply to this message to re-open it.

    Best,
    Diego.

    Thread Starter marusche

    (@marusche)

    Hi Diego,

    many thanks that work.
    Have a sunny day!

    Regards

    Angela

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Position of Terms checkbox in Checkout’ is closed to new replies.