checkout

Add fee for Cash on delivery payment method (cod) in Woocommerce

假装没事ソ 提交于 2020-01-02 06:32:54
问题 In WooCommerce I need to apply a custom handling fee for a specific payment gateway. I have this piece of code from here: How to Add Handling Fee to WooCommerce Checkout. This is my code: add_action( 'woocommerce_cart_calculate_fees','endo_handling_fee' ); function endo_handling_fee() { global $woocommerce; if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return; $fee = 5.00; $woocommerce->cart->add_fee( 'Handling', $fee, true, 'standard' ); } This function add a fee to all transactions Is it

WooCommerce API: create order and checkout

ぃ、小莉子 提交于 2020-01-01 03:48:08
问题 WHAT AM I TRYING TO DO I want to make a Native Android APP (Not HTML5/Jquery mobile) for my Woocommerce website. I am trying to setup the APIs using kloon/WooCommerce-REST-API-Client-Library. So far I managed to retrieve the lists of products, coupons, customers, orders etc... which I could use to display in my Android app. Now I want to replicate add to cart/checkout process in the android app, but it seems this library dosen't provide functions for such workflow. MY QUESTION How can I

Magento: save custom address attribute in checkout

青春壹個敷衍的年華 提交于 2019-12-30 05:06:47
问题 this is what i did in my website: Admin->Customers->Attributes->Manage Customer Address Attributes and add a new attribute , the user can see it in his/her profile, under My Addresses option, the new attribute can be edited and is saved when creating a new address, i also can see it in the backend, and edited, untill here everything is ok, my problem is in the checkout, i already have the field in the billing and shipping forms and i want the new attribute to be saved when the user click

Remove attribute values from product variation title and show them on separate rows

爷,独闯天下 提交于 2019-12-29 08:52:08
问题 I have a checkout page where I want to: Remove selected product attribute values from product variation title item. Remove the quantity from item title too. Display the different product attribute value such as size, color and the quantity on different rows, for this product variation item. I want to display on my checkout page: Aria Sport Shorts (the product title) Color: Dusty Pink Size: Small QTY: 1 Instead of this: Is it possible? Where I should start to make this real? 回答1: UPDATED 1)

Add Custom registration fields in WooCommerce and phone field validation issue

陌路散爱 提交于 2019-12-29 08:15:55
问题 Similar questions have been asked before and I tried all the solutions but for some reason they won't work for me. I have a mini Woocommerce registration field included in the footer of my site so that people can register easily. The phone field is required but I want to set a minimum length to it to reduce the number of people entering fake numbers. I have the following codes added to my functions.php, (I'm including all the notifications to the form so that you can understand better) the

Make Woocommerce checkout phone field optional based on shipping country

心不动则不痛 提交于 2019-12-28 13:57:51
问题 In Woocommerce checkout, I am trying to make the phone field not required for specific shipping countries. Based on "Make checkout phone field optional for specific countries in WooCommerce" answer code, which works fine, I have tried to make some changes to get this code working for the shipping country rather than billing country. After a lot of tries, I wasn't able to figure out how to make it work. Any help will be awesome and greatly appreciated. 回答1: The following code will make billing

PayPal checkout - credit card tab by default

萝らか妹 提交于 2019-12-28 06:06:41
问题 Is there anyway to make that the part where you enter your credit card information is open by default, instead of the part where you enter your paypal information? I really need this, but wasn`t able to find anywhere! 回答1: The only way to do that is with Express Checkout. In your SetExpressCheckout request you set SOLUTIONTYPE=Sole and LANDINGPAGE=Billing. This will force the full credit card form to be displayed so people can enter a credit card without creating a PayPal account... This can

PayPal checkout - credit card tab by default

孤街醉人 提交于 2019-12-28 06:06:07
问题 Is there anyway to make that the part where you enter your credit card information is open by default, instead of the part where you enter your paypal information? I really need this, but wasn`t able to find anywhere! 回答1: The only way to do that is with Express Checkout. In your SetExpressCheckout request you set SOLUTIONTYPE=Sole and LANDINGPAGE=Billing. This will force the full credit card form to be displayed so people can enter a credit card without creating a PayPal account... This can

PAYPAL Express Checkout REST API, Payment status is pending instead of completed

给你一囗甜甜゛ 提交于 2019-12-25 01:00:40
问题 I've a problem with the Express Checkout REST API : after that the user has approuved the transaction with the paypal form, I call the "execute" method by passing the payment attributs (token, id, payerId,...). In the returned data, the status of the payment is indicated as "approved". My trouble is that although the payment is well present of the activity list of the sandbox acount that i use for my tests, it still labelised as "pending". I've tried to use the REST API with the PHP SDK and

Woocommerce: Get order id after checkout page [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-24 13:01:20
问题 This question already has answers here : How can I get the order ID in WooCommerce? (5 answers) Closed 9 months ago . I have purchased the Woocommerce Subscriptions plugin and i want to be able to get the order ID in checkout page. I want this, because when a subscription is about to end, an email with a payment link is sent to the customer and an order is automatically added. When customer clicks the link, it redirects to the checkout page in order to pay for the order. I need the order ID