WooCommerce: Delete Customer After a Failed (Spam) Order

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:16 de agosto de 2023
  • Tempo de leitura:5 minutos de leitura

Once again, I’m trying to find WooCommerce anti-spam workarounds to avoid manual admin work like receiving hundreds of emails, deleting hundreds of fake orders and fake WordPress users. In today’s “episode” I will try to clean the WordPress User database table after a failed order, because I’m really angry when “17PmU3MmKZS9ZAy7 17PmU3MmKZS9ZAy7” manages to register…

Continue lendoWooCommerce: Delete Customer After a Failed (Spam) Order

WooCommerce: Disable “Password Changed” Administrator Emails

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:9 de agosto de 2023
  • Tempo de leitura:4 minutos de leitura

The “Password Changed” email is – actually – a WordPress core notification. It goes to admins when a WordPress user changes their password, and the email body says something along the lines of “Password changed for user: XYZ“. So, why are we saying this email notification can be stopped if you run a WooCommerce website?…

Continue lendoWooCommerce: Disable “Password Changed” Administrator Emails

WooCommerce: Checkout Anti-Spam Honeypot

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:9 de agosto de 2023
  • Tempo de leitura:4 minutos de leitura

Here’s my second attempt to fight against WooCommerce spam, without installing a captcha plugin. A few posts ago I covered the My Account user registration spam, so today I want to tackle the WooCommerce Checkout, and try to “trick” spam bots. Of course, this is a workaround and smart bots may understand you’re tricking them.…

Continue lendoWooCommerce: Checkout Anti-Spam Honeypot

WooCommerce: Add to Cart Form @ Shop Page

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:2 de agosto de 2023
  • Tempo de leitura:4 minutos de leitura

We’ve already covered a similar customization on Business Bloomer: how to display Ajax quantity selectors on the WooCommerce Shop page. The problem there was that that only works for simple products, and only when Ajax add to cart is activated via the WooCommerce settings. Today I’d like to experiment a little, and see what happens…

Continue lendoWooCommerce: Add to Cart Form @ Shop Page

WooCommerce: Display “Related Product Categories” @ Single Product Page

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:2 de agosto de 2023
  • Tempo de leitura:3 minutos de leitura

The WooCommerce Single Product page, on top of letting you add to cart the current item, also displays a list of related products and up-sells (when defined). But what if you ALSO want to show a grid of “related product categories”, so that the customer can easily navigate to a category page instead of a…

Continue lendoWooCommerce: Display “Related Product Categories” @ Single Product Page

WooCommerce: 6 Inventory Management Issues

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:26 de julho de 2023
  • Tempo de leitura:5 minutos de leitura

In the competitive world of eCommerce, managing your inventory effectively is a key factor in achieving success. However, for many WooCommerce store owners, grappling with common inventory management issues can be challenging. As you no doubt know, inventory management can often be a complex task, but it doesn’t have to feel overwhelming. By understanding all…

Continue lendoWooCommerce: 6 Inventory Management Issues

WooCommerce: Disable Payment Gateway By Product Type

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:26 de julho de 2023
  • Tempo de leitura:4 minutos de leitura

Ever wondered if you could toggle payment gateways based on whether a given “product type” is in the WooCommerce Cart? For example, disable PayPal if there are simple subscription products, or enable Stripe only when there are variable products? Well, with this simple code (and the 2 examples) you find below, you can manage to…

Continue lendoWooCommerce: Disable Payment Gateway By Product Type

WooCommerce: Get Customer Second Last Order

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:26 de julho de 2023
  • Tempo de leitura:4 minutos de leitura

There is a native, handy way to get a WooCommerce customer’s last order: wc_get_customer_last_order( $customer_id ) This time, I want to write some custom code to get the second last order instead. We will indeed reuse most of the above function code and change it slightly. Enjoy! This is the native code to get a…

Continue lendoWooCommerce: Get Customer Second Last Order

WooCommerce: Anonymize All Users & Orders

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:19 de julho de 2023
  • Tempo de leitura:10 minutos de leitura

Especially when you need to let other people (such as developers) log in to your WooCommerce website, you may want to protect the identity of your customers and your order details. Of course, anonymizing your WooCommerce backend requires a complete database override – this change is 100% irreversible! Only run this code if you know…

Continue lendoWooCommerce: Anonymize All Users & Orders

WooCommerce: Get Product / Order Cross-Sells

  • Autor do post:
  • Categoria do post:Woocommerce
  • Última modificação do post:19 de julho de 2023
  • Tempo de leitura:3 minutos de leitura

Getting the list of cross-sells for a WooCommerce product is actually super easy (yes, it’s one line of PHP). But what if you need to “calculate” the list of cross-sells for an entire order, made of different products? In this short tutorial for developers we’ll see both: how to get the cross-sell IDs for a…

Continue lendoWooCommerce: Get Product / Order Cross-Sells