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

Execute preset application #3

Closed
allysonsouza opened this issue Mar 4, 2021 · 3 comments
Closed

Execute preset application #3

allysonsouza opened this issue Mar 4, 2021 · 3 comments
Assignees

Comments

@allysonsouza
Copy link
Owner

Create a page, or top bar button, or widget, to execute preset application on the site. The user must have a dropdown (or other interface component) to select which preset they want to apply.

PS: Maybe we should create a default entry on plugin activation, storing the woocommerce settings and customer meta on it.

@foosantos
Copy link
Collaborator

PS: Maybe we should create a default entry on plugin activation, storing the woocommerce settings and customer meta on it.

Great idea! I created issue #4, so we can possibly consider adding something even deeper like adding a button that allows you to create a preset based on your current settings.

@foosantos
Copy link
Collaborator

I believe that we would need something like that for doing it if I'm not missing anything:

  1. Press button/element of the preset post that will trigger a function
  2. This function would get all the post field values from the post selected, and it would associate these values on a variable
  3. After that, the function would apply all the presets on the settings

@foosantos
Copy link
Collaborator

I had a basic implementation as part of 8cc3b14, but it still requires a full review. Also, it is currently overwriting all fields as default, but it would make more sense just applying the fields that have a value added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants