# Shopify Functions examples > These are free Shopify Functions written in JavaScript for API version 2026-10. Each page covers one rule, such as hiding Cash on Delivery above a cart total or blocking PO box addresses, with the input query, the run function, the shopify.extension.toml and test input and output you can run with the Shopify CLI. Shopify Scripts stopped running on 30 June 2026; these are the Function equivalents. ## Payment customization - [Hide Cash on Delivery above a cart total](https://lintelagency.com/resources/shopify-functions/hide-cash-on-delivery-above-cart-total.md): A Shopify payment customization Function that hides Cash on Delivery when the cart total is above a limit you set, with tested JavaScript. - [Hide Cash on Delivery by country, province or ZIP code](https://lintelagency.com/resources/shopify-functions/hide-cash-on-delivery-by-region.md): A Shopify payment customization Function that hides Cash on Delivery for countries, provinces or ZIP prefixes you list in a metafield. Tested JavaScript. - [Rename and reorder payment methods at checkout](https://lintelagency.com/resources/shopify-functions/rename-and-reorder-payment-methods.md): A Shopify payment customization Function that renames payment methods and changes their order at checkout from a JSON metafield. Tested JavaScript. - [Net payment terms for B2B buyers](https://lintelagency.com/resources/shopify-functions/b2b-net-payment-terms.md): A Shopify payment customization Function that sets Net 30 (or 7–90 day) payment terms and an optional deposit for B2B company buyers. Shopify Plus. ## Delivery customization - [Hide express shipping for heavy carts](https://lintelagency.com/resources/shopify-functions/hide-express-shipping-for-heavy-carts.md): A Shopify delivery customization Function that hides express rates when a shipment weighs more than a limit, 30 kg by default. Tested JavaScript. - [Hide shipping rates by product tag](https://lintelagency.com/resources/shopify-functions/hide-shipping-rates-by-product-tag.md): A Shopify delivery customization Function that hides chosen shipping options when the cart has a product with a given tag, such as oversized or hazmat. - [Add a delivery note to shipping option names](https://lintelagency.com/resources/shopify-functions/rename-shipping-options-with-delivery-note.md): A Shopify delivery customization Function that appends a delivery note such as “3–5 business days” to shipping option names, by title and country. - [Hide courier delivery options for PO box addresses](https://lintelagency.com/resources/shopify-functions/hide-delivery-options-for-po-boxes.md): A Shopify delivery customization Function that hides UPS, FedEx and other courier options when the shipping address is a PO box. Tested JavaScript. ## Cart and checkout validation - [Block PO box shipping addresses](https://lintelagency.com/resources/shopify-functions/block-po-box-addresses.md): A Shopify cart and checkout validation Function that stops checkout when the shipping address is a PO box and shows a message on the address field. - [Minimum and maximum quantity per product](https://lintelagency.com/resources/shopify-functions/min-max-quantity-per-product.md): A Shopify validation Function that enforces a minimum and maximum order quantity per product, read from two product metafields. Tested JavaScript. - [Require a minimum order value](https://lintelagency.com/resources/shopify-functions/minimum-order-value.md): A Shopify validation Function that blocks checkout below a minimum order value set in your store currency and converted for each market. Tested JavaScript. - [Restrict products to tagged customers](https://lintelagency.com/resources/shopify-functions/restrict-products-to-tagged-customers.md): A Shopify validation Function that lets only customers with a tag, such as trade or wholesale, check out with products that carry a restricted tag. ## Discounts - [Tiered volume discount by quantity](https://lintelagency.com/resources/shopify-functions/tiered-volume-discount.md): A Shopify discount Function that gives 5%, 10% or 15% off a product as the customer buys 3, 5 or 10 of it. Tiers live in a metafield. Tested JavaScript. - [Discount for customers with a tag](https://lintelagency.com/resources/shopify-functions/discount-by-customer-tag.md): A Shopify discount Function that takes a percentage off the order for signed-in customers with a tag such as VIP or wholesale. Tested JavaScript. - [Buy X get Y discount](https://lintelagency.com/resources/shopify-functions/buy-x-get-y-discount.md): A Shopify discount Function for buy X get Y offers: buy 2 of one product, get 1 of another free or discounted, cheapest first. Tested JavaScript. - [Free shipping above a total, excluding a collection](https://lintelagency.com/resources/shopify-functions/free-shipping-above-total-excluding-collection.md): A Shopify discount Function that gives free shipping above a cart total while products in excluded collections don’t count towards it. Tested JavaScript. - [One discount Function, configured by metafield](https://lintelagency.com/resources/shopify-functions/metafield-configured-discount.md): A Shopify discount Function whose product and order discounts are set per discount in a JSON metafield, so one deploy serves many campaigns. - [Free gift with purchase](https://lintelagency.com/resources/shopify-functions/free-gift-with-purchase.md): A Shopify discount Function that makes one gift item free once the rest of the cart reaches a threshold. The gift must already be in the cart. ## Cart transform - [Expand a bundle into its components](https://lintelagency.com/resources/shopify-functions/expand-bundle-into-components.md): A Shopify cart transform Function that expands a bundle product into its component variants in the cart, using the standard component metafields. - [Merge cart lines into a bundle](https://lintelagency.com/resources/shopify-functions/merge-lines-into-bundle.md): A Shopify cart transform Function that merges component lines into one discounted bundle line when the full set is in the cart. Tested JavaScript. - [Personalization fee with lineUpdate](https://lintelagency.com/resources/shopify-functions/personalization-fee-line-update.md): A Shopify cart transform Function that adds an engraving fee to the line price and title when a line item property is filled in. Shopify Plus. ## Fulfillment constraints - [Keep pre-orders in a separate shipment](https://lintelagency.com/resources/shopify-functions/keep-pre-orders-in-separate-shipment.md): A Shopify fulfillment constraints Function that sends tagged pre-order items from a pre-order location and in-stock items from the others.