checkout

Customize the text “Total” in WooCommerce checkout page

社会主义新天地 提交于 2019-11-27 07:57:31
问题 I would like to change the the "Total" text in my checkout page to "Total inkl. vat". I have tried different things without success… Here is what I am targeting: <?php _e( 'Total', 'woocommerce' ); ?> This is the code snippet. I've searched in all language files but i can't find anything. I've installed the Q translate plugin but I don't think it's the problem. I could code it hard, but thats not a good solution because I've to do this edit in all my files. How can I achieve this please?

Custom dropdown selector showing or hiding other Checkout custom fields

自作多情 提交于 2019-11-27 07:12:13
问题 I use this code to create custom checkout fields and reorder fields: add_filter( 'woocommerce_checkout_fields', 'custom_checkout_billing_fields' ); function custom_checkout_billing_fields( $fields ) { // 1. Creating the additional custom billing fields // The "status" selector $fields['billing']['billing_status']['type'] = 'select'; $fields['billing']['billing_status']['class'] = array('form-row-wide, status-select'); $fields['billing']['billing_status']['required'] = true; $fields['billing']

Change “Billing Details” text to “Shipping Details” on Woocommerce checkout page

 ̄綄美尐妖づ 提交于 2019-11-27 06:32:51
问题 I currently have a bit of code in my child theme's functions.php file which is supposed to change "Billing Details" to say "Shipping Details" on my Woocommerce checkout page. However, when I updated to Woocommerce 3.0, the code snippet stopped working. Below is the code I was using. function wc_billing_field_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Billing Details' : $translated_text = __( 'Shipping Details', 'woocommerce' ); break; } return

Reordering checkout fields in WooCommerce 3

喜夏-厌秋 提交于 2019-11-27 05:32:23
I'm trying to re-order 2 custom checkout fields added with the help of woocommerce_checkout_init filter, just that when I apply woocommerce_checkout_fields filter to re-order fields, it doesn't recognize them and they are null . I think it's because the filter woocommerce_checkout_init goes after woocommerce_checkout_fields . How Can I solve this? Here is my code: add_action( 'woocommerce_checkout_init', 'wc_add_confirm_email_checkout', 10, 2 ); function wc_add_confirm_email_checkout( $checkout ) { $checkout->checkout_fields['billing']['billing_email2'] = array( 'type' => 'text', 'label' => __

How to set custom grand total before checkout process in magento?

无人久伴 提交于 2019-11-27 03:37:52
问题 I have added an observer on "sales_order_place_before" Event and want to customize grand total before processing the payment. but i have tried a lot to change the quote price but it is not working. Does anyone have any idea?? 回答1: You need to add new collector after grand total one (Mage_Sales_Model_Quote_Address_Total_Grand). It has to modify sum that was set by grand total collector. I spoke about such a case at MageConf conference in Ukraine week ago. Video and slides are not available yet

Express Checkout error message: “Security header is not valid”

99封情书 提交于 2019-11-26 22:50:20
I'm implementing Express Checkout in PayPal. I have no problem with the first two steps, SetExpressCheckout and GetExpressCheckout . But when I use DoExpressCheckout , I encounter the error "Security header is not valid". The API credentials are the same! I've fixed it by changing the $environment to live in DoExpressCheckout . (The difference $environment makes is that it'll use https://api.sandbox.paypal.com/nvp/ instead of https://api-3t.$environment.paypal.com/nvp ) But why? Is there something wrong with https://api-3t.$environment.paypal.com/nvp ? Cheery https://api-3t.sandbox.paypal.com

Hide Added to Cart message in Woocommerce

大兔子大兔子 提交于 2019-11-26 22:04:31
问题 I want to remove the "xx product has been added to your cart" message from the top of my checkout page. How can I do that? There was a suggestion by someone (link below), but it didn't work for me. Remove/Hide Woocommerce Added to Cart Message but Keep/Display Coupon Applied Message 回答1: Update for Woocommerce 3+ The hook wc_add_to_cart_message is deprecated and replaced by wc_add_to_cart_message_html . You can use the following (compact effective way): add_filter( 'wc_add_to_cart_message

Woocommerce checkout page internal server error

烈酒焚心 提交于 2019-11-26 21:06:17
I am having 500 internal server error in checkout page in woocommerce. While order for simple product then it's work fine, but when use with bookable product then booking order is saved in admin panel, mail is also send, but order recipt not display in checkout page, having error in this wc-ajax=checkout, checked in console. A most popular problem of 500 internal server error is some fatal errors in backend part of your website. To find, where you got problem, you should to remove this from your wp-config.php file: define( 'WP_DEBUG', false ); And instead of it add this code: define( 'WP_DEBUG

WooCommerce - Overriding billing state and post code on existing checkout fields

人走茶凉 提交于 2019-11-26 17:12:04
问题 I can't find the way to ovveride billing state and post code. How can I edit the other parts of existing billing fields like billing state and post code? This is what I have in the functions.php file in my child theme (I have included the code affecting the billing part): <?php function my_custom_checkout_field( $checkout ) { global $wpdb; $check_zone = $wpdb->get_results("select area_name from brick_area where id='".$_SESSION['area']."'",ARRAY_A); if(!empty($check_zone)){ $check_zoneid =

Express Checkout error message: “Security header is not valid”

谁说胖子不能爱 提交于 2019-11-26 08:27:34
问题 I\'m implementing Express Checkout in PayPal. I have no problem with the first two steps, SetExpressCheckout and GetExpressCheckout . But when I use DoExpressCheckout , I encounter the error \"Security header is not valid\". The API credentials are the same! I\'ve fixed it by changing the $environment to live in DoExpressCheckout . (The difference $environment makes is that it\'ll use https://api.sandbox.paypal.com/nvp/ instead of https://api-3t.$environment.paypal.com/nvp ) But why? Is there