woocommerce/woocommerce-subscriptions-restrict-product

Allow for customization/translation of warning messages

Opened this issue · 2 comments

This is a feature request that I predict will happen. I can add it in at a later date if it becomes necessary.

Would need to customize:

  • Single product warning
  • Cart warning
  • Default WooCommerce "is not purchasable" alert box

Could set as a storewide setting in the options, or on a product level.

Another option might be to make it translatable, so that people could use Say What? to change the text themselves. That would have the added benefit of making it translatable for international users as well.

Places to adjust the text to make more sense:

  • 'Add to Cart' button (says 'read more' when product isn't purchasable)
  • Alert that pops up when a variation product isn't purchasable possibly relevant

@jessLundie If you decided to bite this off, this is the general approach I would take to get started:

  1. Test the plugin and note every place that a warning message appears. Start to investigate where in the code these messages are originating.
  2. Research how other plugins, such as Subscriptions, add warning messages. Specifically regarding translatability.
  3. Decide on what the best solution to UI would be. Do we need an input in the admin area, or do we just rely on translation for customization?