Remove HTML tags from WordPress comments

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 »

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 »