Black Friday sale on now! Save 40% on themes and extensions in the WooCommerce Marketplace. 💰📈🎉 Shop the sale
Product Icon

All Products for WooCommerce Subscriptions

Offer your existing products on subscription, with this powerful add-on for WooCommerce Subscriptions.

Add USEFUL data to subscription options array

The $options variable in product-subscription-options.php, by default, does not contain anything useful in order to customise the output with template overrides.

The array just needs the product price and sale price adding as values, and for these to update on selecting a variation.

This data is already pulled through somewhere in the function that generates this array, and when changing the variation, as it is included in the description of a subscription. It just needs to be included as individual options too.

Author

Current Status

Open

Last updated: May 19, 2022

3 comments

Log in to comment on this feature request.

  1. Nick Roberts says:

    This is easily added by including the below in the options arrays in class-wcs-att-display-product.php – 2 second task, but unless WC Developers add it, the plugin can’t be updated!

    ‘product_price’ => $product->get_regular_price(),
    ‘price’ => $product->get_price()

  2. Nick Roberts says:

    This is a SIMPLE change, creating VAST opportunities for developers to customise the output of the subscription options.

    No idea why it hasn’t been added as standard.

  3. Nick Roberts says:

    Looking into this further, the filters within the file are not firing again when changing a variation.

    They run on first load, but don’t run again after changing a variation, but the rest of the function in the plugin is loading which in turn reload the prices when coded within the plugin file, but not running the filters in the theme hooked into the function.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.