Skip to main content
A White Pixel
  • WordPress Gutenberg Developer’s Guide
  • Latest Posts
    • WordPress
    • Gutenberg
    • Themes
    • WooCommerce
    • Gravity Forms
    • Advanced Custom Fields

Category: WooCommerce

Create Custom WooCommerce Product Tabs with Advanced Custom Fields

When viewing a product in WooCommerce information about the product is displayed in tabs. These tabs are fixed and generated by WooCommerce, outside your control. This post will show you how add code that allow the authors to add custom tabs with custom content to products. Disclaimer: There is a WooCommerce extension called WooCommerce Tab […]

How to Programatically Add a Custom Discount to WooCommerce Checkout

In this post we’ll look at how we add discounts programatically and automatically. To do this we utilize WooCommerce’s coupon functionality but we make it automatic, and we hide the fact that it’s a coupon to the customers. I have tried to keep the code as general as possible as the conditions for applying discounts […]

Guide on How to Add Custom Fees to WooCommerce Checkout by Code

There are some cases when you might need to add a fee to the cart totals. Sometimes only if a certain condition is met, for example depending on the cart totals or shipping location. With WooCommerce adding a fee is pretty easy – much easier than adding a discount in fact. In this post we’ll […]

How to Add Custom Endpoints to My Account page in WooCommerce

This post will go through how to add custom endpoints to WooCommerce‘s “My Account” page. We can make it accessible in two ways; either as an own custom tab, or as a button to each order in the “Orders” tab. WooCommerce’s “My Account” page is using WordPress’ built-in functionality for endpoints which makes it easy […]

How to Change Common WooCommerce Texts with Code

WooCommerce is chock-full of filters, hooks and functions to help you customize and utilize the plugin in your theme or plugin. Here are some small, but useful, code examples, a-ha’s and how-tos of common changes of different text outputs. Changing “Add to cart” button texts There are two filters; one for “add to cart” texts […]

How to Add Custom Fields and Tabs into WooCommerce Product Data Metabox by Code

In this post we’ll learn how to add your custom meta fields into WooCommerce’s Product data metabox; how to add fields and also how to add your own custom tab. We’ll go into detail about how to add your fields, where to add them, how to save them, and finally how to display them in […]

Guide: Customize WooCommerce Checkout Fields by Code

In this post you’ll learn how to change, remove or reposition default checkout fields in WooCommerce, and how to add your own custom field. The checkout fields filter WooCommerce offers a filter for all checkout fields: woocommerce_checkout_fields. There is also dedicated filters for billing and shipping fields; woocommerce_billing_fields and woocommerce_shipping_fields but they both end up […]

Guide: Change Prices in WooCommerce by Code

This post is for you who want to add code that adjusts the prices in your WordPress WooCommerce webshop. You can either increase the prices or discount them. And how and from where the adjustments come, depend entirely on your case. Your webshop could operate with percentage discounts set on each registered user, a custom […]

Coding for WooCommerce: An introduction

This is a beginner developer’s introduction to the plugin WordPress WooCommerce. In this post we’ll look at the basics of how WooCommerce works and how we can customize it in our theme or plugin using hooks and templates. First off, WooCommerce offers great flexibility for theme and plugin developers to adjust its functionality. For simple […]

Categories

  • Advanced Custom Fields (7)
  • Gravity Forms (5)
  • Gutenberg (31)
  • Mini Tips (3)
  • Themes (30)
  • WooCommerce (9)
  • WordPress (37)

Newest Posts

  • How to Translate custom Gutenberg Blocks with block.json
  • Creating Custom Gutenberg Blocks with block.json
  • Gutenberg: Updating withSelect and withDispatch into React Hooks (useSelect and useDispatch)
  • How to Add Post Meta Fields to Gutenberg Document Sidebar
  • In-Depth Guide in Creating and Fetching Custom WP REST API Endpoints
  • How to Deprecate Gutenberg Blocks

Tags

admin (5) ajax (2) cpt (4) css (4) filters (10) hooks (12) i18n (3) javascript (28) media (1) menus (6) object-oriented (2) plugin customization (20) post query (5) rewrite url (3) scripts and styles (6) seo (3) theme (17) widgets (3) WP REST API (2)