How to send invoice with pay now link automatically in woocommerce? - wordpress

I want to send the invoice with checkout link automatically via email when customer order product in woocommerce ( Although manually email can be sent )

You can override the default Email Invoice template or create a custom email template and add the payment link using get_checkout_payment_url().

Related

How to get order recipient on WooCommerce mail template

I need to get woocommerce_new_order_recipient in my email-order-details.php template mail because I need to hide the product price row if the recipient is not test#test.com.
How can I do that?
Thanks all.

Check user email address before Place Order button is pressed in WooCommerce

We have a special product on our WooCommerce shop and we want it to be purchased only once per email address. Please note that Customer is NOT logged in. Is there a way to check the email address user enters on the checkout page before the order is placed and show a message that they have already purchased the product with this email address and disable the Place Order button. If customer changes the email address, they can proceed with the purchase as long as the email address has never been used previously to purchase that product.
I just found this link here. https://www.skyverge.com/blog/prevent-repeat-purchase-with-woocommerce/
It suggests using the wc_customer_bought_product function to check against the user's email address to see if they have previously purchased the product.
// return false if the customer has bought the product
if ( wc_customer_bought_product( wp_get_current_user()->user_email, get_current_user_id(), $product_id ) ) {
$purchasable = false;
}
It requires a user to be logged in but there is no reason you couldn't use ajax at the checkout and test the email form field (in place of wp_get_current_user()->user_email) with that function and then if you get a true response you could replace the submit button from the checkout form with an error message.

How to remove custom fields from “WooCommerce Thankyou Order” email?

I have added custom fields to my product. I don't want to display those into "WooCommerce Thankyou Order" email. Please, can someone tell me, how to hide the custom fields?
For ex: I want to hide the details that are highlighted email template
Go WooCommerce in the wordpress Dashboard, click on Email tab. At the end you have Email Template.
In order to override the default email template edit woocommerce/templates/emails/customer-process-proshop/woocommerce/emails/customer-processing-order.php
At least that's WooCommerce instructions says. I do not have a wordpress with commerece to test or check that file but I suppose in there you could decide what information is actually sent to the customer.

How to add order confirmation page after billing address page in Woocommerce?

The default WooCommerce checkout structure is this:
cart->billing address -> checkout
but i need an order confirmation page after the billing address is fill correctly.
So i need this:
cart->billind address->confirm order->checkout.
I found the woocommerce germanized plugin, but it's isn't working wel..

woocommerce check out field

I use checkout by amazon or by paypal express checkout, when user clicks on amazon or on pay pal , when control comes back on my site after logging in paypal or on amazone, I have no extra checkout field, that I created using checkout field editor ('How did you find Us?'), Just the order summary is listed, how can I show my extra created field?
I use woocommerce plugin for shopping cart.
Checkout fields are only shown on checkout, when someone returns from a payment gateway (paypal in your case) by default they are logged in. So in order to show a text area after someone returns from paypal, you will have to edit the order summary template and add a check to it. So if the user is reffered from paypal, only then they will see your custom form.
A better way would be by using "woocommerce_payment_complete" hook and redirect the user to another page where you can add your custom functionality/ Gravity form shortcode or use contact form 7.

Resources