Skip to content

Add missing 'path' to Discount queryableMethods#175

Merged
duncanmcclean merged 1 commit intoduncanmcclean:1.xfrom
Jamesking56:fix/discount-queryable-path
Apr 20, 2026
Merged

Add missing 'path' to Discount queryableMethods#175
duncanmcclean merged 1 commit intoduncanmcclean:1.xfrom
Jamesking56:fix/discount-queryable-path

Conversation

@Jamesking56
Copy link
Copy Markdown
Contributor

Summary

  • Adds 'path' to the queryableMethods() array in Discount, matching Cart and Order

Fixes #174

Problem

The Discount class is missing 'path' in its queryableMethods() array. This causes the stache path index to overwrite the path cache with null values during stache:warm, because getQueryableValue('path') falls through to a data lookup instead of calling $this->path().

After any deployment that clears and warms the stache, all discount paths become null, resulting in errors when listing discounts in the CP or applying discounts to carts.

@Jamesking56 Jamesking56 force-pushed the fix/discount-queryable-path branch 2 times, most recently from d5496bf to dcaabfe Compare April 20, 2026 05:19
@Jamesking56 Jamesking56 force-pushed the fix/discount-queryable-path branch from dcaabfe to 7cf0ca5 Compare April 20, 2026 05:20
@duncanmcclean duncanmcclean merged commit 23774f0 into duncanmcclean:1.x Apr 20, 2026
14 checks passed
@github-actions
Copy link
Copy Markdown

Released as part of v1.3.3.

@duncanmcclean
Copy link
Copy Markdown
Owner

Thanks!

@Jamesking56 Jamesking56 deleted the fix/discount-queryable-path branch April 20, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discount: missing 'path' in queryableMethods causes null stache paths after warm

2 participants