I have several products in the store, however one product (flammable) can only be shipped via a specific shipping company; Unfortunately that company can’t reach the whole country. So in case the customer buys the flammable product and it’s outside the coverage of the only company that can ship the product, he should not see any other shipping option except
Tag: woocommerce
Count only top level WooCommerce product categories form custom shipping calculations
I am using Increase Shipping cost per categories count found in WooCommerce cart answer code from my previous question. How to exclude subcategories from the array of product categories Ids, to keep …
Local pickup custom percentage discount in WooCommerce checkout
I am using Local pickup shipping option custom percentage discount in Woocommerce answer code to make local pickup discount of 2% on Woocommerce. So people who choose to pickup their order get a discount on their total amount. This code is great, but I would like to hide it on cart page, and to only show up on the checkout
How can I remove parentheses from WooCommerce subcategory product count
On any default WooCommerce category page, it lists categories (product photo, title/link) with a number in parenthesis. For example, Finishing (6). The page html looks like this: I tried this php to remove just the parenthesis, obviously that didn’t work: My goal is to style that count with a background color and border radius, which I can’t now because the
woocommerce add category nav to product-category pages or dynamic pages
I have the product categories navbar on top of the shop page. If I click on any of the category navbar, then it take me to the product-categories page, however, on top of this page, the categories …
Get on sale dates for the variations of a WooCommerce variable product
Is there any way to get on_sale_from and on_sale_to dates for WooCommerce variable products in an array using PHP? The highlighted red boxes in this screenshot:
Display sub subcategories terms list on WooCommerce subcategory archive pages
In Woocommerce I use Get the subcategories of the current product category in Woocommerce archives answer function, to display a list of subcategories on the parent category pages But I only need to …
WooCommerce: Get URL of paged shop archive
I need the link to the paged shop archive URL to add it as rel=canonical. As default WooCommerce seems to use always the URL of the “All products” page. For example: The all product archive page has the following URL: If I go to page 2, the URL is still the one from above. But the correct version would be:
WooCommerce: Remove “Products” archive from Yoast breadcrumbs
I want to remove the link to the products archive in the breadcrumbs on all pages. To do that, I found a solution in the Yoast docs. It works fine except on the product pages. Here’s my current code: It removes the link on archive pages and all other WooCommerce pages as you would expect by the conditional tag is_woocommerce().