Code Snippet

Waving off or discounting the shipping cost of a product, if certain other product is present in the cart

In this article, I will explain the solution to calculate shipping cost. Requirement : let’s begin the fun If the user has ordered products only from product category “bulky”, each line item in the cart should be charged a delivery fee. These products cannot be mixed and require multiple deliveries. If the user has ordered products […]

Waving off or discounting the shipping cost of a product, if certain other product is present in the cart Read More »

Add an additional cost to shipping service based on Shipping Class

The code snippet facilitates you to the specific class(es). Add the following code to your functions.php or anywhere relevant. In the above code: – $shipping_class_ids contains the IDs of shipping class(es) for which you want to add an additional cost for shipping. – $extra_cost contains an additional cost which is to shipping. – $shipping_services contains IDs of services

Add an additional cost to shipping service based on Shipping Class Read More »

Add Purchase Order ( PO ), Invoice, Customer Reference, and Department numbers

The code facilitates you tomer reference, and department numbers on shipment label. Add the following code to your functions.php or any where relevant. In the above code, assign $po_number, $inv_number, and $custo $reff array. For all existing values, append $request with $reff and return $request.

Add Purchase Order ( PO ), Invoice, Customer Reference, and Department numbers Read More »

Hide ‘FedEx Ground’ for specific zip code

The code snippet facilitates you to hide the shipping service – FedEx Ground. You can hide this shipping service in a cart/checkout page for specified zip code. Add the following code to your functions.php or anywhere relevant. In the above code: – $woocommerce->customer->get_shipping_postcode() returns the zip code of destination. – $zip_array contains the zip codes for which you

Hide ‘FedEx Ground’ for specific zip code Read More »

Code snippet to display shipping phone number in label in place of billing phone number

[vc_cta h2=”FedEx Shipping Plugin for WooCommerce”]#1 WooCommerce FedEx Shipping plugin that offers unparalleled features like Audor Support. 6,000+ Active Installs 100+ Customer Reviews 97% Customer Satisfaction Rating [/vc_cta] This code snippet displays shipping phone number in a label in place of billing phone number. Add the following code in Appearance –> Editor –> functions.php. The screenshot below

Code snippet to display shipping phone number in label in place of billing phone number Read More »

Scroll to Top