WooCommerce comes with various shortcodes that can be used to put content inside posts and pages. All shortcodes work correctly only when they are properly inserted. Please carefully insert WooCommerce shortcodes.
WooCommerce Shortcodes for Page
Below the following shortcode for WooCommerce pages:
a) Cart Page: Woocommerce cart shortcode displays cart content and coupon codes and other cart objects.
[woocommerce_cart]
b) Checkout Page: Woocommerce checkout shortcode displays the checkout process.
[woocommerce_checkout]
c) Order Tracking: Woocommerce order tracking shortcode allow user see the status of order by entering their order details.
[woocommerce_order_tracking]
d) User Account: Woocommerce my account shortcode shows the ‘my account’ section where the customer can view previous orders and update their detail.
[woocommerce_my_account]
Woocommerce products shortcode
The Woocommerce products shortcode is these most important shortcodes. These [products] shortcode allow you to display products by post ID, SKU, categories, attributes, and more. See below some shortcodes examples:
Recent Products
[recent_products per_page="12" columns="4"]
It is show the lists of most recent products added to your WooCommerce site. It is very useful on the homepage for show recent products. The ‘per_page’ shortcode determines how many products to show on the page. The columns attribute controls how many columns show on page for products.
Featured Products
[featured_products per_page="12" columns="4"]
It works the same as recent products but displays products have been set as “featured”. In this above example, the shortcode is saying: Show 12 featured products in 4 columns in a row.
Product: Show single product by ID or SKU.
[product id="89"]
[product sku="F011"]
Products: Show multiple products by ID or SKU.
[products ids="1, 2, 3, 4, 5"]
[products skus="port23, york21, bag22" orderby="date" order="desc"]
Product Category shortcodes
These two woocommerce category shortcode will display your product categories on any page.
[product_category] – Display a specified product category.
[product_categories] – Display all your product categories.
Product Category: Use the below code to show multiple products in a category by slug.
[product_category category="motorola"]
Product search functionality
[woocommerce_product_search]
It creates a simple search facility anywhere on a page. It shows you instant search results that match searching criteria. It is very useful to help your users while they are trying to search any product in your website.
There are many more shortcodes which we will be discussing later. You may also want to read our complete article on how to fix woocommerce thumbnail gallery error after updating woocommerce plugin.
[woocommerce_my_account] i.d #A4782276 CHECK
If need any help, please clear your point.
Do you know a plugin that recognises the visitors location and autofill when they go to the checkout?
like amazon plz suggest me
Can you send your website link?