checkout

Change Checkout “Billing Details” text for a specific product in Woocommerce

[亡魂溺海] 提交于 2020-08-26 13:50:38
问题 How can I change the text "Billing Details" in Woocommerce checkout page only for a specific product? I have tried: /* Change the Billing Details checkout label to Your Details: */ function wc_billing_field_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Billing Details' : $translated_text = __( 'Your Details', 'woocommerce' ); break; } return $translated_text; } add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 ); But it's changing the text for all

Changing the 'Shipping' text in WooCommerce cart and checkout pages: [duplicate]

烂漫一生 提交于 2020-08-25 03:46:34
问题 This question already has answers here : How to change WooCommerce text shipping in checkout (4 answers) Closed 2 years ago . I'm using WooCommerce with the Storefront theme and I'm trying to alter the word "Shipping" on the basket page with totals. I found some advice here: https://kriesi.at/support/topic/change-shipping-text-to-delivery-on-checkoutcart/ However, they mention it might require custom work to do this. Can anyone please advise? Paul 回答1: Add this hook in function.php add_filter

Hooking After Validation but Before Order Create in Woocommerce Checkout

夙愿已清 提交于 2020-08-24 11:01:34
问题 I am trying to create a step in checkout to confirm your order. I'm thinking when the place order button is clicked AND the checkout fields are valid I could run some JS to show a modal or whatever. Is there a JS trigger/event similar to checkout_place_order that runs after validation? For example, I can use the following but it happens before validation. Maybe there is a way to trigger validation from inside there and display my modal based off that? var checkout_form = $('form.checkout');

Add pop up and a custom message based on country in Woocommerce checkout

江枫思渺然 提交于 2020-08-24 03:49:09
问题 I am using the below code which works well to add a message to the woocommerce checkout when customers choose a country. But i also want to add a pop up using this shortcode echo do_shortcode('[sg_popup id=3839] '); But when i add it below the text message the pop up always shows, i.e. if i add the following `echo '<div class="shipping-notice woocommerce-info" style="display:none">Please allow 5-10 business days for delivery after order processing.'; echo do_shortcode('[sg_popup id=3839] ');

Enable delivery time options for a specific state in Woocommerce checkout

为君一笑 提交于 2020-08-23 09:49:09
问题 Based on "Add a custom checkbox in WooCommerce checkout which value shows in admin edit order", I am trying to display custom radio buttons fields only if customer state is NewYork to let customer pick a delivery time in checkout page by choosing a delivery time option. Then admin could see the chosen delivery time in admin order edit pages. This image will explain everything: Here is my code attempt (with one checkbox for testing) : $user_state = get_user_meta( get_current_user_id(),

Disable item name link for specific product in Woocommerce cart checkout and orders

﹥>﹥吖頭↗ 提交于 2020-08-23 07:59:28
问题 I'm looking to disable the product link to the product page of a specific product in the cart. This product is a gift product automatically added to the cart when the cart subtotal amount equals a particular value. I know it's possible to do this with all the cart items. But I'm not quite sure on how to target a specific item. 回答1: New answer that works for all product types for an array of defined products Ids, here: Disable item link for specific products in WooCommerce cart checkout and

Show SKU on cart and checkout pages in Woocommerce 3

混江龙づ霸主 提交于 2020-08-22 06:40:07
问题 I would like to display SKU on cart (Under product column ) and checkout page. I searched SO, but all answers are for old versions of WooCommerce and non of them is for 3.x. How can I show SKU on cart and checkout pages in Woocommerce 3? 回答1: 2020 Update: How display product SKU directly under item name in WooCommerce? You can do it with a custom unction hooked in woocommerce_cart_item_name action hook, this way: add_filter( 'woocommerce_cart_item_name', 'showing_sku_in_cart_items', 99, 3 );