{"id":126114,"date":"2022-06-29T11:07:51","date_gmt":"2022-06-29T11:07:51","guid":{"rendered":"https:\/\/phppot.com\/?p=17340"},"modified":"2022-06-29T11:07:51","modified_gmt":"2022-06-29T11:07:51","slug":"how-to-add-custom-field-to-product-in-woocommerce","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2022\/06\/29\/how-to-add-custom-field-to-product-in-woocommerce\/","title":{"rendered":"How to Add Custom Field to Product in WooCommerce"},"content":{"rendered":"<div class=\"modified-on\" readability=\"7.0697674418605\"> by <a href=\"https:\/\/phppot.com\/about\/\">Vincy<\/a>. Last modified on June 29th, 2022.<\/div>\n<p>WooCommerce is the best among the top eCommerce software which is free. It is based on WordPress platform. Setting up a shopping cart is quite easy with WooCommerce.<\/p>\n<p>In previous articles, we have seen some WooCommerce-based code for the following utilities.<\/p>\n<p>The WooCommerce product showcase displays the information that meets the customer demand. Sometimes preliminary details cannot convey all and let the customer identify their destiny.<\/p>\n<p>This is something that needs adding additional information using custom-field integration. WooCommerce plugins support adding custom fields to products via the admin interface.<\/p>\n<p>We will see those options below and their usage methodologies of them.<\/p>\n<h2>Why a WooCommerce shop admin needs Custom Fields<\/h2>\n<p>Before adding custom fields to a product, learn why a WooCommerce shop needs this.<\/p>\n<p>Because, some of the shops have a <a href=\"https:\/\/phppot.com\/php\/top-10-factors-in-ecommerce-shopping-cart-software-gallery-design\/\">routine product gallery<\/a> with usual data like title, image and price. In that case, the custom fields are not required.<\/p>\n<p>The below list shows the advantages of this custom fields feature on a <a href=\"https:\/\/woocommerce.com\/\" target=\"_blank\" rel=\"noopener\">WooCommerce<\/a> shop.<\/p>\n<ul>\n<li>To add product metadata that is for displaying additional information about products.<\/li>\n<li>To allow customers to provide more specifications on the products to purchase.<\/li>\n<li>To add user-friendly interactive fields to save their effort on giving customizations.<\/li>\n<li>To add promotions, offers, discounts and all.<\/li>\n<li>To support end-user to specify a delivery date, time and place.<\/li>\n<li>To apply tax, and shipping by toggling the custom switch.<\/li>\n<\/ul>\n<h2>Types of custom fields creation supported by WooCommerce plugins<\/h2>\n<p>The available <a href=\"https:\/\/wordpress.org\/download\/\" target=\"_blank\" rel=\"noopener\">WooCommerce plugins<\/a> can add two types of custom fields for products.<\/p>\n<ol>\n<li>Data fields \u2013 The field accepts information to be displayed on the UI.<\/li>\n<li>Add-on fields \u2013 Fields that collect data from the user on the storefront.<\/li>\n<\/ol>\n<h3>1. Data fields \u2013 The field accepts information to be displayed on the UI<\/h3>\n<p>This custom field is for showing more information apart from the regular title, price and all. This will help to show product metadata about features, version, rating and all.<\/p>\n<p>For example, a monitor, to show extra information like,<\/p>\n<table class=\"tutorial-table\">\n<tbody>\n<tr>\n<td>Brand<\/td>\n<td>Dell<\/td>\n<\/tr>\n<tr>\n<td>Model<\/td>\n<td>Dell 20H<\/td>\n<\/tr>\n<tr>\n<td>Screen Size<\/td>\n<td>23<\/td>\n<\/tr>\n<tr>\n<td>Features<\/td>\n<td>HDMI, Anti-glare<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>2. Add-on fields \u2013 Fields that collect data from the user on the storefront<\/h3>\n<p>This type of custom field is about creating options for the customer to interact with. It is to allow adding more specifications or customization on the pursued product.<\/p>\n<p>It is for adding personalized information by the customers on the product purchase. Example,<\/p>\n<ul>\n<li>A multi-option field to select the size or color of a T-shirt.<\/li>\n<li>A text field to collect a brand name to be engraved on a purchased pen.<\/li>\n<\/ul>\n<h2>Methods of adding custom fields display in WooCommerce<\/h2>\n<ol>\n<li>Using WooCommerce plugins.<\/li>\n<li>Adding code to display custom fields for products.<\/li>\n<\/ol>\n<h2>Method 1: Using the plugin<\/h2>\n<p>We have taken three plugins to support adding custom fields to a product in a WooCommerce shop. Those are having advanced features and are also easy to set up.<\/p>\n<ol>\n<li>Advanced Product Fields for WooCommerce<\/li>\n<li>Product Addons for WooCommerce<\/li>\n<li>Advanced Custom Fields<\/li>\n<\/ol>\n<h3>1. Advanced Product Fields for WooCommerce<\/h3>\n<p>This plugin is used for adding additional fields to the WooCommerce product page. It helps to embed product add-on fields to allow customers to personalize the order.<\/p>\n<p>Look into the plugin details and prerequisites below.<\/p>\n<table class=\"tutorial-table\">\n<tbody>\n<tr>\n<td>Version<\/td>\n<td>4.5 or higher<\/td>\n<\/tr>\n<tr>\n<td>Active installations<\/td>\n<td>20,000+<\/td>\n<\/tr>\n<tr>\n<td>PHP version<\/td>\n<td>5.6 or higher<\/td>\n<\/tr>\n<tr>\n<td>Last updated<\/td>\n<td>2 weeks ago<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Features<\/strong><\/p>\n<ul>\n<li>The custom product field selected on the product page can be carried over to the cart and checkout pages. It is persistent on the entire flow until the order receipt.<\/li>\n<li>Smooth product field builder in the backend with a seamless experience.<\/li>\n<li>It has the option to add multiple prices to manipulate the base price of the products on selection.<\/li>\n<li>It supports all possible interactive fields with the <a href=\"https:\/\/phppot.com\/jquery\/jquery-show-hide\/\">show hide option<\/a>.<\/li>\n<li>It allows products and custom-field mapping interfaces to control the visibility.<\/li>\n<li>WooCommerce tax figure customization is possible.<\/li>\n<li>Multi-lingual in <a href=\"https:\/\/phppot.com\/wordpress\/how-to-translate-wordpress-translation-ready-themes\/\">translation-ready themes<\/a>.<\/li>\n<\/ul>\n<p><strong>Steps to use<\/strong><\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/advanced-product-fields-for-woocommerce\/\" target=\"_blank\" rel=\"noopener\">Download this plugin<\/a> from the official WordPress repository. Then install and activate it for the WooCommerce shop. If you are new to WordPress, then see here <a href=\"https:\/\/phppot.com\/wordpress\/how-to-install-a-wordpress-plugin-for-beginners\/\">how to set up a plugin<\/a>.<\/p>\n<ol>\n<li>Go to Product -&gt; Add New via the WooCommerce admin menu.<\/li>\n<li>Click \u201cCustom fields\u201d under the \u201cProduct data\u201d panel.<\/li>\n<li>Configure \u201cField group layout\u201d settings. It is to specify the position of the label or a field note if any. Also, it helps to mark a field as mandatory.<\/li>\n<li>Select \u201cAdd the first field\u201d or \u201cAdd field\u201d and specify field type, label, and all.<\/li>\n<li>Add conditional rules to add dependencies between fields to be displayed.<\/li>\n<\/ol>\n<p>This is the WooCommerce admin interface to add the custom fields for products. I have added the <em>Size<\/em> option for the product as a ratio group.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-17696\" src=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-setting-550x200.jpg\" alt=\"advanced product field setting\" width=\"550\" height=\"200\" srcset=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-setting-550x200.jpg 550w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-setting-300x109.jpg 300w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-setting-768x279.jpg 768w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-setting.jpg 800w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\"><\/p>\n<p>This will show the added custom field on the product front end as a radio option.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-17700\" src=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-output-550x349.jpg\" alt=\"advanced product field output\" width=\"550\" height=\"349\" srcset=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-output-550x349.jpg 550w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-output-300x191.jpg 300w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/advanced-product-field-output.jpg 600w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\"><\/p>\n<h3>2. Product Addons for WooCommerce<\/h3>\n<p>This plugin says the purpose clearly by its name itself. Yes, it is to add more add-on fields to let the customer interact with the shop to personalize the purchase.<\/p>\n<p>An easy custom form builder allows for building a field group for the WooCommerce shop pages. Have a look at the version and other details below.<\/p>\n<table class=\"tutorial-table\">\n<tbody>\n<tr>\n<td>WordPress Version<\/td>\n<td>4.0 or higher<\/td>\n<\/tr>\n<tr>\n<td>Active installations<\/td>\n<td>30,000+<\/td>\n<\/tr>\n<tr>\n<td>PHP version<\/td>\n<td>5.6 or higher<\/td>\n<\/tr>\n<tr>\n<td>Last updated at<\/td>\n<td>3 weeks ago<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/woo-custom-product-addons\/\" target=\"_blank\" rel=\"noopener\">Download this plugin<\/a> from the WordPress repository linked. The plugin provides a <a href=\"https:\/\/phppot.com\/jquery\/jquery-drag-and-drop\/\">drag-and-drop interface<\/a> to build custom field groups for products.<\/p>\n<p><strong>Features<\/strong><\/p>\n<ul>\n<li>Capable of personalizing the purchase order.<\/li>\n<li>It saves the customer\u2019s personalized data via a custom field added for products in the backend.<\/li>\n<li>For builder helps to design a group of the custom fields.<\/li>\n<li>Allows more types of fields like text, number and email fields, combo fields and all.<\/li>\n<li>In the base version, it allows adding &lt;p&gt; and &lt;h*&gt; tags to display product meta in the front end.<\/li>\n<\/ul>\n<p><strong>Steps to use<\/strong><\/p>\n<p>There are a few steps to add and display a custom field on a product page of a WooCommerce theme.<\/p>\n<ol>\n<li>Go to <em>Products-&gt;Custom Product Addons<\/em> via the WordPress admin menu.<\/li>\n<li>Add a new form of product custom fields group and publish it.<\/li>\n<li>Go to <em>Products<\/em>&nbsp;and open a new or edit product panel.<\/li>\n<li>Choose <em>\u201cCustom Product Options\u201d<\/em> from the&nbsp;<em>Product data<\/em> group.<\/li>\n<li>Check the form to add a mapping between custom fields and products.<\/li>\n<\/ol>\n<p>See the following two screenshots to add custom fields and map them for the product.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-17737\" src=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-settings-550x582.jpg\" alt=\"product addons settings\" width=\"550\" height=\"582\" srcset=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-settings-550x582.jpg 550w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-settings-283x300.jpg 283w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-settings.jpg 600w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-17738\" src=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-mapping-550x365.jpg\" alt=\"product addons mapping\" width=\"550\" height=\"365\" srcset=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-mapping-550x365.jpg 550w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-mapping-300x199.jpg 300w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-mapping.jpg 600w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\"><\/p>\n<p>Then, the WooCommerce shop will show the custom fields on the single product page.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-17739\" src=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-output-550x566.jpg\" alt=\"product addons output\" width=\"550\" height=\"566\" srcset=\"https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-output-550x566.jpg 550w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-output-292x300.jpg 292w, https:\/\/phppot.com\/wp-content\/uploads\/2022\/06\/product-addons-output.jpg 600w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\"><\/p>\n<h3>3. Advanced Custom Fields<\/h3>\n<p>It supports full control of the WordPress edit screen and custom form data.<\/p>\n<table class=\"tutorial-table\">\n<tbody>\n<tr>\n<td>WordPress Version<\/td>\n<td>4.7 or higher<\/td>\n<\/tr>\n<tr>\n<td>Active Installations<\/td>\n<td>2+ million<\/td>\n<\/tr>\n<tr>\n<td>PHP Version<\/td>\n<td>5.6 or higher<\/td>\n<\/tr>\n<tr>\n<td>Last updated<\/td>\n<td>6 days ago<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The simple and intuitive plugin has powerful functions and over 30 field types<\/p>\n<p><strong>Features<\/strong><\/p>\n<ul>\n<li>It provides powerful functions to customize and add custom fields for the product<\/li>\n<li>Good and simple backend interface to add custom field group on a need basis.<\/li>\n<li>Supports 30+ field types to set more data apart from the standard custom product fields.<\/li>\n<\/ul>\n<p><strong>Steps to customize<\/strong><\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/advanced-custom-fields\/\" target=\"_blank\" rel=\"noopener\">Download<\/a> or install via admin to enable this plugin before going to read the below steps.<\/p>\n<ol>\n<li>Add and customize the field group.<\/li>\n<li>Add form fields into the group.<\/li>\n<li>Add data for the custom fields on the product page.<\/li>\n<li>Display the product information on the front end.<\/li>\n<\/ol>\n<p><strong>Step 1: Add and customize field group<\/strong><\/p>\n<p>Go to <em>Custom Fields<\/em> via the admin menu. Add a new field group and specify the UI location and other settings.<\/p>\n<p>It helps to set states and styles to add and show the custom fields on a product page. It manages the relative position and alignment of the field on the UI.<\/p>\n<p>Fields can also be mapped for posts, products, pages and more.<\/p>\n<p><strong>Step 2: Add form fields into the group<\/strong><\/p>\n<p>The field add interface allows the following data to enter. For combo fields, it asks to enter multiple options to the loaded.<\/p>\n<ul>\n<li>label,&nbsp;name,&nbsp;type.<\/li>\n<li>Field notes or helps text.<\/li>\n<li>If the field is required or not.<\/li>\n<li>Place holder and default value.<\/li>\n<li>Content to prepend or append.<\/li>\n<li>Character restriction,&nbsp;Rules.<\/li>\n<li>Field wrapper classes or ids.<\/li>\n<\/ul>\n<p><strong>Step 3: Add data for the custom fields based on products<\/strong><\/p>\n<p>If the custom field group is mapped for the location of product pages, then the add\/edit page will show it.<\/p>\n<p>Add the data for the custom fields which will be displayed on the WooCommerce product at the shop.<\/p>\n<p>##image<\/p>\n<p><strong>Step 4: Display the product information on the front-end<\/strong><\/p>\n<p>Then display the custom fields data on the product single page at the front-end.<\/p>\n<p>In this plugin, we need to add a simple shortcode to display the custom fields on the product page.<\/p>\n<p>The [acf field=\u201d&lt;field-id or slug&gt;\u201d] <a href=\"https:\/\/phppot.com\/wordpress\/how-to-create-shortcode-in-wordpress\/\">shortcode<\/a> is used for displaying the custom field group.<\/p>\n<p>There are a couple of functions in WordPress to display the fields for a WooCommerce product.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">&lt;php\nthe_field(\"&lt;field-id or slug&gt;\");\n?&gt;\n<\/code><\/pre>\n<p>or<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">&lt;php\n$customFieldGroup = get_field(\"&lt;field-id or slug&gt;\");\necho $customFieldGroup;\n?&gt;\n<\/code><\/pre>\n<h2>Method 2: Adding custom fields via the program<\/h2>\n<p>Thus, we have seen how to add product custom fields in a WooCommerce platform using plugins. If you want to implement the same without using plugins, it\u2019s very simple with a few steps.<\/p>\n<p>These steps render the custom fields on the WooCommerce product page. After collecting the user inputs in the product page, the custom code will display them on the cart page.<\/p>\n<p>Steps to implement this method by adding custom code are listed below.<\/p>\n<ol>\n<li>Add a custom field in the product data panel on the WooCommerce admin.<\/li>\n<li>Save added custom field data into cart metadata.<\/li>\n<li>Display an input field in a product single page.<\/li>\n<li>Passing the values on the cart and checkout pages.<\/li>\n<\/ol>\n<p>Add this custom code in the WordPress active theme\u2019s function.php file.<\/p>\n<h3>1. Adding custom fields in the product data panel<\/h3>\n<p>Create code for displaying custom fields in the WooCommerce product data panel. The woocommerce_product_options_general_product_data hook is used to call this code.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">\/* Add product meta field for the WooCommerce admin *\/\nfunction woocommerce_custom_select_dropdown(){ $select = woocommerce_wp_select(array( 'id' =&gt; '_select_color', 'label' =&gt;__('Select color', 'woocommerce'), 'options' =&gt; array( 'Black' =&gt; __('Black','woocommerce'), 'Blue' =&gt; __('Blue','wooocommerce'), 'Pink'=&gt; __('Pink','woocommerce') ), ));\n}\nadd_action('woocommerce_product_options_general_product_data', 'woocommerce_custom_select_dropdown');\n<\/code><\/pre>\n<p>This example adds a dropdown as a custom field for products. So, it uses the woocommerce_wp_select function to set the following parameters.<\/p>\n<ul>\n<li>id<\/li>\n<li>label<\/li>\n<li>description<\/li>\n<li>desc_tip<\/li>\n<li>options<\/li>\n<\/ul>\n<p>There are similar functions to add other types of form fields. For example,<\/p>\n<ul>\n<li>woocommerce_wp_textarea_input<\/li>\n<li>woocommerce_wp_checkbox<\/li>\n<li>woocommerce_wp_hidden_input<\/li>\n<\/ul>\n<h3>2. Save the user input in the custom fields to cart metadata.<\/h3>\n<p>Then, another action hook is added to save the custom field value on the product meta. This will be called on saving the product details. It calls the woocommerce_process_product_meta action and hooks the handler.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">\/* Save custom field data for the product *\/\nfunction woocommerce_product_custom_fields_save($post_id)\n{ $woocommerce_select_color_field = $_POST['_select_color']; if (!empty($woocommerce_select_color_field)) { update_post_meta($post_id, '_select_color', esc_attr($woocommerce_select_color_field)); }\n}\nadd_action('woocommerce_process_product_meta', 'woocommerce_product_custom_fields_save');\n<\/code><\/pre>\n<h3>3. Display an input field in a product single page<\/h3>\n<p>In this section, it prepares an add-on field HTML if the product meta is not empty.<\/p>\n<p>First, the admin chooses and saves the product color option. Then this code will add a dropdown field on the product single page.<\/p>\n<p>It reads the current product meta with the reference of the global post object. Then, it fetches the product meta by the custom field id.<\/p>\n<p>In the WooCommerce product page, this custom field is added before the cart button. It is because of hooking the action woocommerce_before_add_to_cart_button&nbsp;to call this handler.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">\/* Show add-on field based on the saved custom field *\/\nfunction woocommerce_display_select_option_value()\n{ global $post; $product = wc_get_product($post-&gt;ID); $select_option_title_field = $product-&gt;get_meta('_select_color'); if ($select_option_title_field) { printf('\n&lt;div&gt;&lt;select name=\"color_option\" class=\"input-text text\"&gt;\n&lt;option value=\"Default Color\"&gt;Default Color&lt;\/option&gt;\n&lt;option value=\"' . $select_option_title_field . '\"&gt;' . $select_option_title_field . '&lt;\/option&gt; &lt;\/select&gt;&lt;\/div&gt;', esc_html($select_option_title_field)); }\n}\nadd_action('woocommerce_before_add_to_cart_button', 'woocommerce_display_select_option_value');\n<\/code><\/pre>\n<h3>4. Display the selected option in the cart and checkout pages<\/h3>\n<p>The following filter hooks handle the functions to display the selected custom option. It has the cart and checkout pages as its target to render the UI component.<\/p>\n<p>This code is triggered on loading the cart item data. It calls the filter hook woocommerce_add_cart_item_data and displays the selected custom field value.<\/p>\n<p>It adds the data into the cart item array which will be later used in the checkout page UI.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">\/* Display selected option in the cart *\/\nfunction woocommerce_add_custom_field_item_data($cart_item_data, $product_id)\n{ if (! empty($_POST['color_option'])) { $cart_item_data['select_field'] = $_POST['color_option']; } return $cart_item_data;\n}\nadd_filter('woocommerce_add_cart_item_data', 'woocommerce_add_custom_field_item_data', 10, 2);\n<\/code><\/pre>\n<p>This is to parse the cart item array and display the custom field value on the checkout page.<\/p>\n<p>It uses the woocommerce_cart_item_name hook to do this change in the checkout UI.<\/p>\n<pre class=\"prettyprint\"><code class=\"language-php\">\/* Display selected option in the checkout *\/\nfunction woocommerce_cart_display($name, $cart_item, $cart_item_key)\n{ if (isset($cart_item['select_field'])) { $name .= sprintf('&lt;p&gt;%s&lt;\/p&gt;', esc_html($cart_item['select_field'])); } return $name;\n}\nadd_filter('woocommerce_cart_item_name', 'woocommerce_cart_display', 10, 3);\n<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>Thus, we have seen both methods to add custom fields to products. It is with or without plugins to enable WooCommerce product custom fields.<\/p>\n<p>I hope, this article gives a basic knowledge in this area. Also, it might help you to understand and replicate the steps to customize your shop.<\/p>\n<p> <!-- #comments --> <\/p>\n<p> <a href=\"https:\/\/phppot.com\/wordpress\/woocommerce-add-custom-field-product\/#top\" class=\"top\">\u2191 Back to Top<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Vincy. Last modified on June 29th, 2022. WooCommerce is the best among the top eCommerce software which is free. It is based on WordPress platform. Setting up a shopping cart is quite easy with WooCommerce. In previous articles, we have seen some WooCommerce-based code for the following utilities. The WooCommerce product showcase displays the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":126115,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-126114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-updates"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/126114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=126114"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/126114\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/126115"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=126114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=126114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=126114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}