shipping

woocommerce exclude state free shipping (australian states)

我只是一个虾纸丫 提交于 2019-12-11 10:03:46
问题 I'm trying to implement woocommerces exclude states from free shipping (Australian Site) snippet but am running into this error: 'Fatal error: Call to a member function get_shipping_state() on a non-object in /home/bpcsport/public_html/wp-content/plugins/wa-exclude/wa-exclude.php on line 30' My client needs to exclude Western Australia from the free-shipping deal they offer through woocommerce. I get the error either way if I put it in my themes function.php or via plug-in format. I've also

Add different custom labels to Woocommerce shipping methods

故事扮演 提交于 2019-12-11 08:34:30
问题 In WooCommerce, I am trying to add "shipping estimates" to my shipping methods (all of them are flat rate type), so it looks like this: Only all the estimated dates are different… My problem is that I can't seem to target specific instances. I can only select entire method (flat rate), I checked for my methods instance ID's, since those are unique: But it only works when I put 0 as a case in php switch method. 2,3,4,5,7 do not work. Here is my code: function sv_shipping_method_estimate_label(

Unsetting WooCommerce shipping method based on cart items shipping classes

一曲冷凌霜 提交于 2019-12-11 07:59:01
问题 I’m trying to unset Flat Rate shipping method only if cart has products both with and without shipping class. If all product in cart have shipping class then it should stay. Have this shipping method: Flat Rate - (flat_rate1) (instance_id=1) And these shipping classes: 50, 100 and so on, with same way named Slugs: 50, 100… Flat Rate shipping method has costs set up for these shipping classes, Main Cost and No shipping class cost for this method are not set, so it only appears for products in

Remove Woocommerce “place order” button for a specific shipping class

╄→尐↘猪︶ㄣ 提交于 2019-12-11 07:32:16
问题 I have a scenario where I need to remove the "Place order" button on the checkout screen for Woo-commerce. Currently I have 2 shipping methods: Flexible shipping and Freight If a customer adds an item with the shipping class of "Freight" to their cart, my current code disables the flexible shipping method and then the freight method displays a message of "Call for current rates". The issue is that they can still checkout essentially without paying anything for shipping which is why if freight

Show Shipping Method data on the Order edit pages in WooCommerce

天大地大妈咪最大 提交于 2019-12-11 07:01:50
问题 In WooCommerce on this website, I have 2 Local Pickup shipping methods: AM pickup: shipping_method_0_local_pickup31 PM pickup: shipping_method_0_local_pickup32 Unfortunately this shipping method does not show up on Admin Order edit pages Is is possible to use: add_action('woocommerce_admin_order_data_after_shipping_address','cwn_add_pickup_to_order_item_meta', 1, 2); function cwn_add_pickup_to_order_item_meta($shipping_method) { echo "<h4>Pickup Time</h4>"; echo '<p><strong>' . __('AM pickup'

UPS API wsdl soap call - cannot set multiple packages

早过忘川 提交于 2019-12-11 05:17:36
问题 I am using wsdl SOAP call in PHP for UPS API. The request object have package information, from/to zipcodes, and other information. I want to set multiple packages but it shows error when more than one package is added in the request object. I am trying to assign multiple packages by pushing package array in the $request['Shipment']['Package'] array. Something is wrong in this part. Here is my code: $request['Request'] = array('RequestOption' => 'Shop'); $request['PickupType'] = array('Code'

Shipping methods - Local Pickup option not available when Flat Rate is hidden

故事扮演 提交于 2019-12-11 05:08:33
问题 Based on this answer (code below), I successfully can hide flat rate from particular product category and local delivery option is available. This is working perfect. The problem: local pickup option is NOT available for that particular category. How can I make the local pickup option available to this special category? This is the code that I use: function custom_shipping_methods( $rates ){ // Define/replace here your correct category slug (!) $cat_slug = 'your_category_slug'; $prod_cat =

Remove shipping methods completely from magento?

二次信任 提交于 2019-12-11 04:45:15
问题 how can i completely remove ALL shipping methods/processes from magento? Thanks 回答1: If you setup your products as Virtual or Downloadable products, the checkout process will skip the Shipping step and only collect payment information. That should achieve your aim? 来源: https://stackoverflow.com/questions/3880574/remove-shipping-methods-completely-from-magento

WooCommerce Free Shipping if over 5 pounds

穿精又带淫゛_ 提交于 2019-12-11 01:40:05
问题 I'm trying to write a function that will offer free shipping only (remove all other options) if the order is over 5 pounds (80 ounces), but it doesn't work although the code seems correct. This is what I have: // Hide ALL shipping options but FREe when over 80 ounches (5 pounds) add_filter( 'woocommerce_available_shipping_methods', 'ship_free_if_over_five_pounds' , 10, 1 ); /** * Hide ALL Shipping option but free if over 5 pounds * * @param array $available_methods */ function ship_free_if

Table Rate Shipping in Magento 1.7 with Wildcards not Working

北城余情 提交于 2019-12-10 19:59:24
问题 Magento 1.7 does not calculate the the shipping costs correctly when i upload a CSV with "*" wildcard in the "Country", "Region", "ZIP". Magento always shows the first shipping price even with cart subtotals above 500. Is this a known bug? Did i do anything wrong? Any ideas? my CSV: https://dl.dropbox.com/u/2499022/TRS-WildCards.png Regards Paul 回答1: According to this guy you must ALWAYS use country codes, otherwise PHP throws a notice of undefined index. We settled for the 3-letter country