documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Update shipping.rst

Open Liam1717 opened this issue 1 year ago • 1 comments

import re

def remove_shipping_methods(text): # Define the sections to remove using regex sections_to_remove = [ r"================\nShipping methods\n================.?\n(?=Website availability)", r"================\nOwn shipping methods\n================.?\n(?=Pickup in store)", r"---------------\nPickup in store.?\n(?=Website availability)", r"================\nShipping providers\n================.?\n(?=Website availability)", r"================\nDelivery method at checkout\n================.*?\n(?=.. image:: shipping/shipping-checkout.png)" ]

# Remove the defined sections
for section in sections_to_remove:
    text = re.sub(section, '', text, flags=re.DOTALL)

return text

Liam1717 avatar Jul 07 '24 06:07 Liam1717

Pull request status dashboard

robodoo avatar Jul 07 '24 06:07 robodoo

@Liam1717 the target branch 'saas-17.2' has been disabled, you may want to close this PR.

robodoo avatar Feb 10 '25 06:02 robodoo