• Resolved birdhousedigital

    (@birdhousedigital)


    Hi,
    Great little plugin!

    I’d like to move the location this is displayed on the Order page, can you give me guidance on how to do this in the functions.php?

    Many thanks.

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

    (@ampmode)

    Hi @birdhousedigital thanks for that! Yes, this is certainly possible.

    First, you will have to add the following line of code to your functions.php or to a site-specific plugin. This will remove the “leave at door” options from the checkout page altogether.
    remove_action( 'woocommerce_review_order_before_submit', 'wlad_checkout_options' );
    Next, you’ll have to add the “leave at door” options back where you want them. You can do that by including an add_action() function that includes the correct function from our plugin (wlad_checkout_options()).
    Here is an example of what you would want to add:
    add_action( 'woocommerce_after_order_notes', 'wlad_checkout_options' );

    The first part of that function (woocommerce_after_order_notes) is the location where the “leave at door” options will be added. This can be changed to any of the action hooks available on the checkout page. See this page for a visual guide of all the action hooks available. The second part (wlad_checkout_options) is the function that adds the options to the checkout page. This should not be changed.

    Altogether, it should look something like this:

    
    remove_action( 'woocommerce_review_order_before_submit', 'wlad_checkout_options' );
    add_action( 'woocommerce_after_order_notes', 'wlad_checkout_options' );
    

    Again, you can change woocommerce_after_order_notes to any of the available action hooks provided in the link above.

    If this has helped you at all, I would encourage you to leave a review to help others find this plugin for their store. If you still need assistance, please let me know.

    Thread Starter birdhousedigital

    (@birdhousedigital)

    Thanks so much for your clear instructions – that’s exactly what I need!

    Plugin Author AMP-MODE

    (@ampmode)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move location on Order page’ is closed to new replies.