-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add user friendly way to add atributes #18
Conversation
'options' => array( | ||
'Honor' => __('Honor', 'woocommerce'), | ||
'Audit' => __('Audit', 'woocommerce'), | ||
'Verified' => __('Verified', 'woocommerce'), | ||
'Credit' => __('Credit', 'woocommerce'), | ||
'Professional' => __('Professional', 'woocommerce'), | ||
'No ID Professional' => __('No ID Professional', 'woocommerce'), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the second place you are using this list of course modes. Maybe it's a good idea to put this array in another file, like utils or something like that, and reuse that array instead of having both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a great idea to have it. I have already added a new file called Openedx_Utils.php
in utils/
folder. This file contains a function that returns an array with those mode options that are now being called using its namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use those utils in our Enrollment Request object form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay. I was mistaken and thought I had already uploaded the change. I will be making the necessary commit to implement the change shortly.
Co-authored-by: María Fernanda Magallanes <[email protected]>
Co-authored-by: María Fernanda Magallanes <[email protected]>
Co-authored-by: María Fernanda Magallanes <[email protected]>
The rest looks good to me. I wonder if @arangos has time to do a review of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
@MaferMazu ready for merge, apporved |
Description
This pull request introduces a user-friendly feature to WooCommerce, allowing non-expert WordPress users to effortlessly create products with essential attributes for Open edX synchronization. The new implementation streamlines the process of adding "course_id" and "mode" attributes, making it easy for administrators to set up course-related products without technical complexity.
Testing instructions
To test it, simply access WordPress, navigate to any WooCommerce product, and scroll down to the product properties box to view the options.
Checklist for Merge