Quantcast
Viewing all articles
Browse latest Browse all 2443

thomasstone on "[Plugin: Woocommerce All Discounts] Discounts on variations"

Hi

First of all great plugin, it almost works perfectly and is easy to use. Although I have a couple of issues:

First I do not think attribute filtering works with variations. For example I have created an attribute called size and created product variations from this attribute.

I then have 2 product lists with Taxonomy conditions 'Size' in 'Large' and in 'Small'. Although at checkout 2 discounts appear to be applied from a list of created discounts, one with the large product list and one with the small even though I only have the large product variation in basket.

I think this is being caused by your 'get_products' function searching like so:

[1] => Array
                (
                    [taxonomy] => pa_size
                    [operator] => IN
                    [terms] => Array
                        (
                            [0] => 10
                        )

                )

But product variations store attributes in the postmeta table (attribute_pa_size) get_posts in this function currently returns the main parent product.

Second I got a 500 error after adding a number of discounts and the error_log pointed to out of memory.

I tracked it down to the following line in class-wad

$this->loader->add_action( 'posts_selection', $discount, 'initialize_used_discounts_array' );

Can it be hooked to anything else?

Thanks!
Thomas

https://wordpress.org/plugins/woo-advanced-discounts/


Viewing all articles
Browse latest Browse all 2443

Trending Articles