Orange County, CA

(949) 876 - 5309 swanlegacy@gmail.com

Category: Business Bloomer

WooCommerce: Add Privacy Policy Consent @ My Account Registration

Here’s a snippet regarding the “My Account” registration form and, once again, GDPR. If you get any website traffic from EU, you will need users to give you Privacy Policy consent – including when they register a new account on your WooCommerce website.
So, how do we display a checkbox on the My Account page, at the bottom of the registration form?
WooCommerce: add Privacy Policy consent to the My Account registration form PHP Snippet: Add Privacy Policy Checkbox @ WooCommerce My Account Registration Form /** * @snippet Add Privacy Policy Checkbox @ WooCommerce My Account Registration Form * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @sourcecode https://businessbloomer.com/?p=74128 * @author Rodolfo Melogli * @testedwith WooCommerce 3.4 */ add_action( 'woocommerce_register_form', 'bbloomer_add_registration_privacy_policy', 11 ); function bbloomer_add_registration_privacy_policy() { woocommerce_form_field( 'privacy_policy_reg', array..

Read More

WooCommerce: Disable Customer Order Email for Free Orders

There are times when you sell free products to give customers access to a membership, an online course, or for other reasons. In this cases, you might not want to send them the “Order Completed” email, as the follow-up work is done by your email marketing software or they are automatically redirected to the resource upon checkout.
Of course, you definitely want to keep the “Order Completed” emails for orders that are not $0. Unfortunately, the method suggested by WooCommerce which “unhooks the emails” cannot be used together with a conditional check (in our case we need to verify if the Order total is $0), so a workaround is needed. Here’s the fix.
WooCommerce: disable a customer email if the order total is 0 PHP Snippet: Disable Customer Order Email for Free Orders – WooCommerce /** * @snippet Disable Customer Order Email for Free Orders – WooCommerce * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @source https://businessbloomer.com/?p=74122 * @author Rodolfo Melo..

Read More

WooCommerce: Easily Get Order Info (total, items, etc) from $order Object

As WooCommerce a freelancer, every day I repeat many coding operations that make me waste time. One of them is: “How to get ____ if I have the $order variable/object?”.
For example, “How can I get the order total”? Or “How can I get the order items”? Or maybe the order ID, customer ID, billing info, payment method, total refunds and so on… hopefully this article will help you save time as well
1. You have access to $order Hooks (do_action and apply_filters) use additional arguments which are passed on to the function. If they allow you to use the “$order” object you’re in business. Here’s how to get all the order information:
// Get Order ID $order->get_id() // Get Order Totals $0.00 $order->get_formatted_order_total( ) $order->get_cart_tax() $order->get_currency() $order->get_discount_tax() $order->get_discount_to_display() $order->get_discount_total() $order->get_fees() $order->get_formatted_line_subtotal() $order->get_shipping_tax() $order->get_shipping_total() $order->get_subt..

Read More

WooCommerce: Save “Terms & Conditions” Acceptance @ Checkout

When going legal… you need proof. Accepting the “Terms and Conditions” on the checkout is required in order to placer an order – but how can you, WooCommerce store admin, “prove” that the Terms and Conditions were actually ticked by the customer?
One of the solutions might be to save such acceptance in the database and print the acceptance on the order admin (and maybe on the customer invoice as well). So, here’s a quick PHP snippet you can simply copy and paste in your child theme’s functions.php file in order to (1) save and (2) print the choice on the Single Order Admin page. Enjoy!
Save Terms & Conditions acceptance upon checkout PHP Snippet: Save “Terms & Conditions” Customer Acceptance @ WooCommerce Checkout /** * @snippet Save “Terms and Conditions” Acceptance Upon Checkout – WooCommerce * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @source https://businessbloomer.com/?p=74053 * @author Rodolfo Melogli * @compatible Woo 3.3.4 */ // 1. Save T&C as Order Meta..

Read More

WooCommerce: Save “Terms & Conditions” User Acceptance @ Checkout

When talking about GDPR or when going legal… you need proof.
Accepting the “Terms and Conditions” on the checkout is required in order to placer an order – but how can you, WooCommerce store admin, “prove” that the Terms and Conditions were actually ticked by the customer?
One of the solutions might be to save such acceptance in the database and print the acceptance on the order admin (and maybe on the customer invoice as well). So, here’s a quick PHP snippet you can simply copy and paste in your child theme’s functions.php file in order to (1) save and (2) print the choice on the Single Order Admin page. Enjoy!
Save Terms & Conditions acceptance upon checkout PHP Snippet: Save “Terms & Conditions” Customer Acceptance @ WooCommerce Checkout /** * @snippet Save “Terms and Conditions” Acceptance Upon Checkout – WooCommerce * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @source https://businessbloomer.com/?p=74053 * @author Rodolfo Melogli * @compatible Woo 3.3.4 */..

Read More

WooCommerce: How to Bulk Edit Products?

You want your website visitors to checkout fast, pay you faster and receive their item quickly. However, speed matters for us WooCommerce store owners as well.
By looking at this year’s time-sheets for my own business, about 50% of the time was spent between marketing and admin – and the “admin” part is the one we’re tackling today.
If you run a busy WooCommerce shop with hundreds of products, you probably noticed how annoying it is to edit products one by one.
Yes, the WooCommerce admin dashboard allows us to do certain bulk edits a la WordPress, however you must play with the “screen options” and also the filtering is not good enough.
On the other end, as WooCommerce managers we’re probably more familiar with Excel-alike spreadsheets where all our products are editable with a single click in a specific cell.
Good news is there are plugins that can make your life easier, your admin time more efficient and your product management simpler. And today we’re taking a look at the best ..

Read More

WooCommerce: Change Autofocus Field @ Checkout

If you decide to delete or reorder checkout fields, you probably also need to change the checkout field with “autofocus”. In plain English, this is the checkout field where the keyboard cursor goes automatically to on checkout page load (by default, this is the Billing First Name).
As usual, changing this default behavior is very easy, even if you’re not familiar with PHP. In the example below, I’m removing the autofocus from Billing First Name and assigning it to the Billing Email field instead.
Copy the snippet, test it on your development environment and only then push it to your live website. Enjoy!
Change the autofocus field @ WooCommerce Checkout PHP Snippet: Change Autofocus Field @ WooCommerce Checkout /** * @snippet Change autofocus field @ WooCommerce Checkout * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @sourcecode https://businessbloomer.com/?p= * @author Rodolfo Melogli * @testedwith WooCommerce 3.3.4 */ add_filter( 'woocommerce_checkout_fields..

Read More

WooCommerce: How to Run an Affiliate / Referral Program?

There is no doubt – one of the fastest, most affordable and easiest ways to increase your WooCommerce sales is to “hire your own customers”.
You’ve probably heard of affiliate commissions, referral programs, influencer marketing, brand ambassadors and so on. Online brands are doing all they can to promote this strategy and “tap” into their fans’ communities.
As a WooCommerce store owner, no matter whether you sell digital or physical products, you should definitely give an affiliate program a go. Besides, what if I told you enabling such a complex system was actually super easy?
With a simple plugin you can immediately add an affiliate marketing program to your WooCommerce website, give registered affiliates their own dashboard with statistics and revenue, pay them via PayPal or Stripe either manually, immediately or monthly and basically do absolutely no coding or complex set up.
Decide your referral commission (e.g. $10 per product, or 15% per order), install the affiliate plugin..

Read More

WooCommerce: Rename “Add to Cart” Button if Product Already @ Cart

When talking about UX, or for very specific WooCommerce shops, you might need to “communicate” to the user a product is already in the Cart before re-adding it or increasing its quantity from the Shop/Category/Loop and Single Product pages.
The “Add to Cart” button label comes with a filter (actually 2 filters, one for the Single Product page and another for the other pages such as Shop), so all we need to do is targeting those two, “filter” the label text in case the product is already in the Cart, and return that back to WooCommerce. If this looks like Japanese to you don’t worry – simply copy/paste the snippet below!
Change the WooCommerce Add to Cart button label if Product is already in the Cart PHP Snippet: Rename “Add to Cart” Button if Product Already @ WooCommerce Cart /** * @snippet Change “Add to Cart” Button Label if Product Already @ Cart * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @source https://businessbloomer.com/?p=73974 * @author Rodolfo Melog..

Read More

WooCommerce: Sort Cart Items Alphabetically A>Z

Your WooCommerce shopping cart might look messy when it contains many products. Your specific business, besides, might require you buy “Part 1” first and “Part 2” after.
A way to tidy up the WooCommerce shopping basket is – for example – to sort products based on their title, from A to Z. As usual, this can be done with a few lines of PHP, even if you have no clue about coding… feel free to copy, paste, and enjoy the snippet
Sort WooCommerce Cart Products Alphabetically PHP Snippet: Sort Products Alphabetically @ WooCommerce Cart /** * @snippet Sort Products Alphabetically @ WooCommerce Cart * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @source https://businessbloomer.com/?p=73953 * @author Rodolfo Melogli * @testedwith Woo 3.3.4 */ add_action( 'woocommerce_cart_loaded_from_session', 'bbloomer_sort_cart_items_alphabetically' ); function bbloomer_sort_cart_items_alphabetically() { global $woocommerce; // READ CART ITEMS $products_in_cart ..

Read More
Facebook Auto Publish Powered By : XYZScripts.com