Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong template version #830

Open
leonardola opened this issue Mar 31, 2025 · 1 comment
Open

Wrong template version #830

leonardola opened this issue Mar 31, 2025 · 1 comment
Labels
type: bug The issue is a confirmed bug. woocommerce-subscriptions-core

Comments

@leonardola
Copy link
Contributor

Describe the bug

Some templates have their @Version set to <version> - <something else>
This makes the version_compare function fail to check if the override template is up to date.

To Reproduce

  • Copy the template file from templates/emails/customer-on-hold-renewal-order.php to your theme/woocommere/emails/customer-on-hold-renewal-order.php
  • Go to wp-admin > WooCommerce > Status > Subscriptions Template Theme Overrides
  • Notice that even though the override template version is the same as the original template Woo complains that it is outdated

Additional context

Ticket 9580591-zd-a8c

@leonardola leonardola added the type: bug The issue is a confirmed bug. label Mar 31, 2025
@barryhughes
Copy link
Member

barryhughes commented Apr 3, 2025

Interesting ... at the risk of overthinking things, I wonder if it is also worth considering a change in Woo Core, since a change to WC_Admin_Status::get_file_version() could solve this, and because, in terms of PHP norms, it's probably not all that unexpected for a @version tag to have addition information beyond the version number itself.

We'd possibly still need to fix things on our side, because of our support policy for older versions of WooCommerce means we wouldn't immediately benefit from this, but I guess this could potentially catch out other plugins/extensions/customizations, too (and so an upstream fix might have some broader value) 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug. woocommerce-subscriptions-core
Projects
None yet
Development

No branches or pull requests

3 participants