• Resolved shuangmiles

    (@shuangmiles)


    I was wondering are there any filters I can use to dynamically add some flat rate shipping options through functions.php with a theme that uses woocommerce. I don’t have any additional shipping plugins, I’m just looking to set up a list of choices of flat fees, but I’d prefer to do this through a filter for possible dynamic situations.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there, @shuangmiles! Thanks for contacting us. I’m happy to help you.

    It is possible to add flat rate shipping via functions.php.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    Having said that, do you mind sharing more details regarding your goal and how you want the flat fees to work?

    The reason I’m asking is because it might be possible to do what you want on the default WooCommerce interface, without the need for custom code.

    The more we know about it, the better so we can guide you in the right direction.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter shuangmiles

    (@shuangmiles)

    I’m looking to do it through code because our client requires a complicated set up, we want to avoid doing a database update cause our client has multiple sites that use the same templates so if we can add these shipping options that would be preferable. I just want to show in the shipping options the radio buttons for like

    Standard – $5
    2 day – $19
    Overnight – $29

    Our client handles shipping separately so they don’t want to use anything like fedex or ups plugin. Any help would be appreciated.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @shuangmiles,

    You can indeed add flat rate shipping options directly through your theme’s functions.php file. You can use the woocommerce_package_rates filter to manipulate the shipping methods and rates.

    If you still need assistance, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter shuangmiles

    (@shuangmiles)

    That helped thank you

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @shuangmiles,

    I’m glad we were able to help! Should you have further inquiries, kindly create a new topic here.

    Meanwhile, if it isn’t too much to ask for – would you mind leaving us a review here?

    It only takes a couple of minutes but helps us tremendously. It would mean so much to us and would go a really long way.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘is there a way to add some custom flat rate shipping options in functions’ is closed to new replies.