• Hello;

    I offer two shipping 1) free and 2) express delivery ($35). Both are being checked by customers by clicking on a radio button. What is the variable name for Express Delivery please?

    I need to know to be able to adjust the delivery date.

    Thank you.

    Lode

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @ndjworldnews,

    I’m not certain this is what you’re looking for. Each shipping method instance is given a unique ID number. You can find it by going to WooCommerce > Settings > Shipping and then click on the shipping zone you’re working with. Right click on the method you’re using, like “Express Delivery” and copy the URL it gives you. The ID will be at the end and look something like this:

    
    https://yoursite.com/wp-admin/admin.php?page=wc-settings&tab=shipping&instance_id=48
    

    In this case, the ID for this shipping method is 48.

    If you have something else in mind, let me know what you’re looking for and we’ll go from there.

    Thanks!

    Thread Starter ndjworldnews

    (@ndjworldnews)

    Ok, i figured out that my instance_id = 3, which equals express shipping. Great what I need to know is how can I know if a customer clicked that option so that I can then adjust my delivery date accordingly.

    Do I check for

    if (instance_id == 3) :
        echo 'here goes the code';
    else :
        echo 'here goes the other code';
    endif;

    Or how would I do that?

    Thanks

    Lode

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘variable used for shipping?’ is closed to new replies.