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

Add format argument to product pricing fields #75

Closed
kidunot89 opened this issue May 18, 2019 · 0 comments
Closed

Add format argument to product pricing fields #75

kidunot89 opened this issue May 18, 2019 · 0 comments
Assignees
Labels
design notes Blueprint and notes for coming feature enhancement New feature or request
Milestone

Comments

@kidunot89
Copy link
Member

Is your feature request related to a problem? Please describe.

  • As of v0.1.0 the pricing fields in Product and ProductVariation types return un-formatted string values, which is counter-productive.

Describe the solution you'd like

  • The fields should return a formatted string by default, eg "$19.99", "$19.99 - $29.99", ...etc, and when the format: RAW is passed as an argument, a raw float value should be returned, eg 19.99, 29.99...etc.
  • The dual typing will be implemented using a simple union type. PricingUnion
  • resolver for the corresponding format: RAW input will require product CPT edit_post cap to resolve.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design notes Blueprint and notes for coming feature enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant