• Hi, I have a developer that has written me a code snippet for customisation of my site, but he said it must be pasted at line 30 into the woocomerce plugin and that it will not work in the code snippet plugin for various reasons.

    Plugins -> Plugin Editor -> Select WooCommerce -> Plugin Files -> templates -> cart -> cart-shipping.php

    woocommerce/templates/cart/cart-shipping.php

    At line 30`

    I don’t want to have to paste in again each time the woocomerce plugin is updated. Is there any good reason a code snippet for a plugin customisation (like woocommerce) cannot be used in the code snippet plugin?

    • This topic was modified 3 years, 4 months ago by ghyootjp.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ghyootjp

    (@ghyootjp)

    Hi, Can someone from Code Snippets please assist?

    Plugin Author Shea Bunge

    (@bungeshea)

    It’s difficult to help without knowing what the snippet you’ve been provided with does. Line 30 of that file shows an if statement that checks the available shipping methods.

    It looks like there’s probably some way to change or inspect that list by hooking to the woocommerce_shipping_packages filter, but as I said, it’s impossible to say with the information we have at the moment.

    Thread Starter ghyootjp

    (@ghyootjp)

    Thank you for the response Shea

    The snippet checks if a Dokan vendor has created free shipping for a zone, fetches this info and displays as a message on the cart and checkout – see screenshot https://www.dropbox.com/s/ltaksh92s34dti4/Screenshot%202021-08-10%20at%2008.42.47.png?dl=0

    Is there a way I could send you the snippet to inspect without making public knowledge on this forum?

    Plugin Author Shea Bunge

    (@bungeshea)

    Sure, you can email me on shea [at] codesnippets.pro

    Thread Starter ghyootjp

    (@ghyootjp)

    Hi team, checking in. Did you manage to receive my e-mail with the code snippet?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce customisation – will code snippet plugin work in this case?’ is closed to new replies.