By default WordPress allows several HTML tags in comment form. These are the default allowed tags: Above list can be different for you if your theme or any plugin is removing or adding more of these tags. You can check by printing allowed_tags function. Simply put echo allowed_tags(); in the… Read More »
Show LearnDash purchased course details on WooCommerce thank you page
LearnDash integrates well with WooCommerce. But there are certain caveats. When an order is placed for a LearnDash course, from WooCommerce, it only shows regular WooCommerce order data with regular WooCommerce products, which were just purchased. But it doesn’t show anything about the purchased courses. If we can show some… Read More »
Hide other shipping options in WooCommerce if free shipping is available
It does not look very ideal to show paid shipping options when free shipping is available, unless they are for express delivery. There is no way to set this up directly from WooCommerce. But we can do this easily by modifying available shipping options/rates using woocommerce_package_rates filter. Following code block… Read More »
Deny PO Box addresses in WooCommerce
Many of you may not want to allow Post Office Box as shipping address. There is no default option in WooCommerce to do it. We can use woocommerce_after_checkout_validation action hook to check if inputted shipping address contains PO Box address or not. Following code checks for the string pobox in… Read More »
Customizing WooCommerce product single page tabs (data tabs)
WooCommerce product single page has three tabs by default: Description Additional Information Reviews We can edit them, reorder them, delete them or add new tabs by using woocommerce_product_tabs filter. If you do a print_r, this is how the default array looks like: Remove Tabs Following snippets demonstrates how to remove… Read More »
Redirect WooCommerce single product page
Redirect to add-to-cart url Instead of showing a single product page, we can add the product to shopping cart, when someone clicks on the single product link or tries to browse the product page with a direct link. This only works for simple product type and simple subscription product type,… Read More »
WooCommerce redirect to custom page after registration
When registrations are open without purchasing any product, by default WooCommerce uses registration form on my-account page. After successful registration, users are redirected to my-account page. Might not be the best way to showcase your shop. Some user might want to redirect recently registered users to a custom page, some… Read More »
Remove shipping address section from WooCommerce Checkout page
By default, clicking on the “Ship to a different address?” checkbox on WooCommerce checkout page displays the shipping fields. Shipping fields can be turned off from WooCommerce Settings. It’s under WooCommerce > Settings > Shipping > Shipping options page. There, select Force shipping to the customer billing address for Shipping… Read More »
Enable Paid Membership Pro for custom post types
By default Paid Membership Pro (PMPro) only works for post and page. If you need to enable support for WordPress custom post types, you will need Custom Post Type (CPT) Membership Access addon, which is part of their PMPro Plus Addon – a quite expensive one, if you are used… Read More »
WooCommerce with Paid Membership Pro – only show allowed products
With Paid Membership Pro (PMPro) plugin, you can restrict certain products for certain membership levels. But by default, when a member visits shop, they can still see those restricted products, which they were not supposed to see. We will avoid that using woocommerce_product_query action hook, by modifying the default WooCommerce… Read More »
