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

Replace ID with slug location for item meta #79

Open
alexmigf opened this issue Mar 16, 2021 · 2 comments
Open

Replace ID with slug location for item meta #79

alexmigf opened this issue Mar 16, 2021 · 2 comments

Comments

@alexmigf
Copy link
Collaborator

From the beginning of this plugin the item meta has been always _stock_at_ID, but some users would benefit if instead of using the ID we use the term slug. Term slugs are also unique per setup, so would be good to replace that. Backwards compatibility must be granted, doing a migration or creating a function that does the conversion.

@shanerutter
Copy link
Contributor

Good to note, terms naming may change, where as ID wont. It is also possible to change the slug of a term which means there would need to be in-depth clean up processes to update now invalid meta data.

Maybe Internally its all handled via ID but there is a function to get the stock via the term slug. Somthing like.

$object->stockAt('location-1');

@alexmigf
Copy link
Collaborator Author

You're right, great point and suggestion.

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

No branches or pull requests

2 participants