wc-smooth-generator
wc-smooth-generator copied to clipboard
[Feature Request] Expose generate_* methods for reusability
Hi ✋
I found this package while testing a feature in WooCommerce Admin. This is a really awesome package for testing 👍
I wanted to use generate_variable_product method in my test where I needed to create a few variable products, but the method is inaccessible as it is protected. I ended up copying the code into my test class.
I can either extend the class to expose generate_* methods or use reflection to make them public on the fly, but I would prefer avoiding workarounds.
Is there a plan to expose generate_* methods? It would be very useful.
I can make a PR if you approve.
@moon0326 It's great to hear that you found Smooth Generator useful. We don't have any current plans to do new development.
However, if you are interested in submitting a PR, we would look at an enhancement that added a --product_type=
option to the generate
command. That would allow people to create test installs with a predefined distribution of product types.
@moon0326 It's great to hear that you found Smooth Generator useful. We don't have any current plans to do new development.
However, if you are interested in submitting a PR, we would look at an enhancement that added a
--product_type=
option to thegenerate
command. That would allow people to create test installs with a predefined distribution of product types.
That sounds great! I will make a PR soon 👍 Thank you!
@moon0326 I went ahead and added a type
parameter to the product generator in #113