unicco
Forum Replies Created
-
Is it just me, or is this thread pretty much NOT RESOLVED?
Forum: Plugins
In reply to: [Additional Variation Images Gallery for WooCommerce] WooCommerce APIHi. No problem, I’ve found another approach. Nevertheless, regarding adding extra images through the API is possible if you store the images ID’s in the variations meta_data. Not quite sure how you’ve made this, but for the official WooCommerce Additional Variations plugin, they store a commaseperated ID’s in _variations_images. This meta-data can be written through WooCommerces official REST APi, so it’s actually quite simpel ??
Nevermind, this aren’t really a question, and I’ve found a solution, so you can just close this.
OK. I added “ari-fancybox”-class to the anchor which wraps around my dynamically added image, and fire window.ARI_FANCYBOX_INSTANCE.convertElements(); after slickAdd. This works.
You can just close this again.
Forum: Plugins
In reply to: [WooCommerce Quickpay] Filters for logosThe filter is not fired. I guess it due to the fact, that I can’t find that specific filter anywhere in the plugin, nor in my project.
I’m using QuickPay version: 4.8.2
Where should this filter be located? As far as I can see, there are no filters which allows me to change the icon.
You call “add_filter(‘woocommerce_gateway_icon’, array($this, ‘apply_gateway_icons’), 2, 3);”, is this the callback function you’re referring to?
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryWell if you have that opinion, I’d prefer getting an explanation, why that is so. As far as I can see, the docs outlines, that it’s possible to have nested meta queries, but when using it, it breaks the site. Actually I had a deadlock in the database, and couldn’t access neither front nor backend. I had to restart mysql service before I could access. If you don’t categorize that as a bug, what is it?
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryAlright. I’ve an solution for this. Seems like this should be reported as a bug in WP. I believe the above way to have nested meta-queries are 1:1 with how the docs state it. However, it kept returning an 504 error. I’m not quite sure why, but it seems like WP_QUERY dosen’t translate the arg-query-array correctly.
Instead I used BETWEEN, without using any nested meta_queries, and this works perfectly.
$args[ 'meta_query' ] = array( 'relation' => 'OR', array( 'key' => '_price', 'value' => array( 1, 3000 ), 'compare' => 'BETWEEN', 'type' => 'DECIMAL', ), array( 'key' => '_price', 'value' => array( 3001, 6000 ), 'compare' => 'BETWEEN', 'type' => 'DECIMAL', ), );
- This reply was modified 7 years, 3 months ago by unicco.
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryActually I tried to build up my meta_query directly in php. This results in a timeout error aswell. Is this a bug in WP, or what the heck?
$args[ 'meta_query' ] = array( 'relation' => 'OR', array( 'relation' => 'AND', array( 'key' => '_price', 'value' => '1', 'compare' => '>=', 'type' => 'DECIMAL', ), array( 'key' => '_price', 'value' => '3000', 'compare' => '<=', 'type' => 'DECIMAL', ), ), array( 'relation' => 'AND', array( 'key' => '_price', 'value' => '3001', 'compare' => '>=', 'type' => 'DECIMAL', ), array( 'key' => '_price', 'value' => '6000', 'compare' => '<=', 'type' => 'DECIMAL', ), ), );
From error_log (the wp query arg):
[15-Aug-2017 07:33:16 UTC] Array ( [post_type] => Array ( [0] => product ) [posts_per_page] => 30 [offset] => 0 [order] => DESC [orderby] => date [post_status] => publish [ignore_sticky_posts] => 1 [paged] => 1 [tax_query] => Array ( [relation] => AND [0] => [1] => Array ( [taxonomy] => product_cat [field] => slug [terms] => Array ( [0] => moebler ) [operator] => IN ) ) [meta_query] => Array ( [relation] => OR [0] => Array ( [relation] => AND [0] => Array ( [key] => _price [value] => 1 [compare] => >= [type] => DECIMAL ) [1] => Array ( [key] => _price [value] => 3000 [compare] => <= [type] => DECIMAL ) ) [1] => Array ( [relation] => AND [0] => Array ( [key] => _price [value] => 3001 [compare] => >= [type] => DECIMAL ) [1] => Array ( [key] => _price [value] => 6000 [compare] => <= [type] => DECIMAL ) ) ) )
- This reply was modified 7 years, 3 months ago by unicco.
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryNo, because
new WP_Query( $args );
returns 504, so I won’t be able to retrieve that prop on that object.- This reply was modified 7 years, 3 months ago by unicco.
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryAnd a timeout error seems pretty weird aswell… If I put weird/wrong things in my query, I’m use to just getting an empty resultset back. But an timeout error confuses me..
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryYes I’m pretty sure about that. If I only have one nested meta query, it works perfectly. That’s why I know, that the inner atts are correct. If I change the outer
relation
to AND this works too, but I want to use OR. Saying either the price is between array 1 or its between array 2. I’m just wondering why this is bugging.- This reply was modified 7 years, 3 months ago by unicco.
Forum: Fixing WordPress
In reply to: WP_QUERY with multiple nested array within meta_queryActually I’m building the query using Ajax, and printing the query args using var_dump returns an error. So I hooked on a filter, an echo to wp_debug_log instead.
The docs states: “Possible values are ‘=’, ‘!=’, ‘>’, ‘>=’, ‘<‘, ‘<=’, ‘LIKE’, ‘NOT LIKE’, ‘IN’, ‘NOT IN’, ‘BETWEEN’, ‘NOT BETWEEN’, ‘NOT EXISTS’, ‘REGEXP’, ‘NOT REGEXP’ or ‘RLIKE’. Default value is ‘=’.”, so it should be possible. I could try BETWEEN instead, but I don’t think it would work.
Forum: Plugins
In reply to: [Import any XML or CSV File to WordPress] Encoding problems with “&”In \wpai-woocommerce-add-on\libraries\XmlImportWooCommerceProduct.php you should change line 585 from
$this->pushmeta($pid, '_variation_description', wp_kses_post($product_variation_description[$i]) );
to
$this->pushmeta($pid, '_variation_description', htmlspecialchars_decode( wp_kses_post($product_variation_description[$i]) ) );
That fixed the problem.
- This reply was modified 7 years, 4 months ago by unicco.
Forum: Plugins
In reply to: [Import any XML or CSV File to WordPress] Encoding problems with “&”Btw. Have you ever heard about “high cohesion” in programming. Your import function is like 5000 lines long. What the freaking **** have you been thinking?
- This reply was modified 7 years, 4 months ago by unicco.
Alright :-).
Is it possible that you could send a mail-notification whenever one of your extensions is updated? Could be pretty awesome – otherwise I’ve to check manually every week, to see if a new update has been released.
Yes, it’d preferable if the cache was made individually instead of on a grouped basis. It might have a small impact on performance, but as long as the file/product is being retrieved statically, I think the performance-difference would be unnoticeable. It would more friendly towards changing the shortcode args aswell (for instance the posts_per_page arg).