Snippets

Use these snippets to customize the appearance and functionality of All Products for WooCommerce Subscriptions.

To use a snippet, download the linked file and activate it as you would with any other plugin. Alternatively, copy the contained code into your child theme’s functions.php file.

Note: We are unable to provide support for customizations under our Support Policy. If you need to customize a snippet, or extend its functionality, seek assistance from a qualified WordPress/WooCommerce Developer. We highly recommend Codeable, or a Certified WooExpert.

Snippets ↑ Back to top

Prevent subscription options from showing up next to cart-items ↑ Back to top

The extension allows customers to switch the subscription plan of individual cart items. If you don’t want to display any subscription plan options next to cart items, use the following snippet:

Prevent coupons from being applied to products on subscription ↑ Back to top

To prevent coupons from being applied to products purchased on subscription, use the following snippet:

It is also possible to prevent coupons from being applied to the cart if one or more products are purchased on subscription:

Remove subscription details from the catalog price of products with optional subscription plans ↑ Back to top

If a product has optional subscription plans, a suffix is appended to its catalog price to inform customers that it is available on subscription. This suffix can be removed with the following snippet:

Hide Subscription plans for specific user roles ↑ Back to top

To hide Subscription plans for specific user roles, use the following snippet:

Restore “Add to Cart” buttons in the catalog ↑ Back to top

If a product has subscription plans, the plugin replaces its default “Add to Cart” catalog button with a “Select Options” button. When clicked, this takes customers to the product page, where they can choose a purchase plan. In some cases, it might be preferable to display an “Add to Cart” button that customers can click to make a one-time purchase directly. This is possible using the following snippet:

Questions & Support ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.
Already purchased and need assistance? Get in touch with us via the Help Desk!

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top