shipping

Remove a dropdown select field filter in Woocommerce admin orders list

丶灬走出姿态 提交于 2020-01-24 01:50:10
问题 In WooCommerce version 3.0+, I would like to remove All shipping Countries filter on Woocommerce order panel. How to do that? any ideas ? Thanks 回答1: This selectors you want to remove are custom and certainly added by a third party plugin. You can try this to hide the drop-down selector field with a custom function hooked in admin_head action hook. You will need to replace the CSS ID #my_selector_id by the ID or the class of the selector you want to hide (using your browser code inspector to

Shipping carrier custom fields validation in Woocommerce checkout page

我只是一个虾纸丫 提交于 2020-01-15 11:05:39
问题 I have added two custom input fields in the shipping method section by changing the template /genesis-sample/woocommerce/checkout/review-order.php I have also managed to get them conditionally required. Only when the specific radio button is checked, the input fields appear and become required. I am using jQuery code to make the fields appear and disappear. All of this is working fine. The code is here: if ( isset($_POST['shipping_method_0_legacy_local_pickup']) && $_POST['shipping_method_0

Shipping carrier custom fields validation in Woocommerce checkout page

主宰稳场 提交于 2020-01-15 11:04:02
问题 I have added two custom input fields in the shipping method section by changing the template /genesis-sample/woocommerce/checkout/review-order.php I have also managed to get them conditionally required. Only when the specific radio button is checked, the input fields appear and become required. I am using jQuery code to make the fields appear and disappear. All of this is working fine. The code is here: if ( isset($_POST['shipping_method_0_legacy_local_pickup']) && $_POST['shipping_method_0

WooCommerce Free Shipping - Remove raw or change the text name on checkout and email

烈酒焚心 提交于 2020-01-14 05:00:09
问题 I am running WooCommerce 2.6.2 on WP 4.5.3 and Sydney template. On the WooCommerce Checkout Page (Order completed) under Order Details, I want to Change the 'Free Shipping' text to something else, or remove this row. I ALSO want to change or remove this row from the Emails sent to the Customer. However, I can't get this text to Translate I've added this to my functions.php // Add this to your functions.php add_filter('gettext', 'translate_reply'); add_filter('ngettext', 'translate_reply');

How can I change shipping amount before execute payment using PayPal restAPI

微笑、不失礼 提交于 2020-01-11 11:49:08
问题 I try to migrate our old express checkout process based on PayPal classic API to new RestAPI , but a question has arisen during the new process: How can I change shipping amount after create a payment and just before execute payment using PayPal restAPI? Request after create payment: { "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [ { "amount": { "currency": "AUD", "total": "100", "details": { "shipping": "10", "subtotal": "75", "tax": "15" } }, "description":

Conditionally hide a Checkout field in WooCommerce based on chosen shipping

ε祈祈猫儿з 提交于 2020-01-10 20:20:12
问题 in WooCommerce, I am trying to hide the company name field whenever "delivery to home" is selected. I've tried a bunch of different things. This is my last attempt: add_filter('woocommerce_checkout_fields', 'xa_remove_billing_checkout_fields'); function xa_remove_billing_checkout_fields($fields) { $shipping_method ='pakkelabels_shipping_gls1'; // Set the desired shipping method to hide the checkout field(s). global $woocommerce; $chosen_methods = WC()->session->get( 'chosen_shipping_methods'

Conditionally hide a Checkout field in WooCommerce based on chosen shipping

倾然丶 夕夏残阳落幕 提交于 2020-01-10 20:19:47
问题 in WooCommerce, I am trying to hide the company name field whenever "delivery to home" is selected. I've tried a bunch of different things. This is my last attempt: add_filter('woocommerce_checkout_fields', 'xa_remove_billing_checkout_fields'); function xa_remove_billing_checkout_fields($fields) { $shipping_method ='pakkelabels_shipping_gls1'; // Set the desired shipping method to hide the checkout field(s). global $woocommerce; $chosen_methods = WC()->session->get( 'chosen_shipping_methods'

Woocommerce get shipping zone name from the shipping method id

早过忘川 提交于 2020-01-05 04:17:11
问题 I have a function that returns the $shipping_method_id (for example flat_rate:3 ). I would like to get the Zone name for this Shipping method rate ID… How to get zone name according to the Shipping method rate ID? 回答1: Building a custom function that will use very simple SQL queries this way: function get_shipping_zone_from_method_rate_id( $method_rate_id ){ global $wpdb; $data = explode( ':', $method_rate_id ); $method_id = $data[0]; $instance_id = $data[1]; // The first SQL query $zone_id =

Set custom shipping rates programmatically in Woocommerce 3

妖精的绣舞 提交于 2020-01-04 08:06:24
问题 I have searched and found a number of examples of how to change the shipping rates. Basically I am looking to do the same, but I want to use a 3rd party API. I have set up a custom plugin with a functions.php and activated it. I think used something simple like this: add_filter('woocommerce_package_rates','test_overwrite',10,2); function test_overwrite($rates,$package) { echo "<h2>Can you see me</h2>"; foreach ($rates as $rate) { //Set the price $rate->cost = 1000; //Set the TAX $rate->taxes

Display shipping methods to frontend as in the admin panel?

◇◆丶佛笑我妖孽 提交于 2020-01-03 03:22:09
问题 In WooCommerce, I'm doing the form of adding / changing product (at the front-end). I need to display the fields for changing the cost of delivery of the installed methods as in the admin panel. How can I do it? Here is my actual code: <form> <!-- Various input fields --> <?php foreach ($shipping_methods as $method) { ?> <lebel> <h3><?php echo $method ?></h3> <input type="number" value="<?php //hook for input - output to make changes of shipping price of this method??Which one ?>"> </lebel> <