morvy
Forum Replies Created
-
Forum: Plugins
In reply to: [Packeta] Konflikt filtrov v objednavkachNahodou ste sa k tomuto nedostali? Dost nam to stazuje pracu v admine, riesenie typu prechod na “stary” plugin od WPify by bol komplikovany kvoli ID dopravy
@haseeb0001 would it be possible to add a filter for the returned RUN_MODE constant? I’d use it to toggle the email sending with WP environment variable (I’d like to disable emails on local/development/staging environments). I know this is not something that everyone wants, that’s why a simple filter would be great.
Thanks for your reply.
Yes I got the point from source code. I wish there was a simpler solution .. I wanted to keep the url as short and meaningful as possible, so either I rename all taxonomy slugs and have short filter slugs, or I just use long slugs for filters that won’t collide.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Partial match does not matchOK, this must’ve been an issue in the DB or something. I disabled the plugin, re-enabled it and there are now hundreds of stopwords in both languages, including “rund” in German. Removed it, reindexed just to be sure and now it works correctly.
Thanks a lot!
- This reply was modified 1 year, 10 months ago by morvy.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Partial match does not matchJust tried “run” and it works, returns a different order, but matches all the products it should match. So it’s really only the “rund” that is not working. I tried to add it to stopwords and remove but without any effect.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Partial match does not matchThe site is WPML – default German, additionaly English.
I’ve checked stopwords, it has only some english stopwords, only 1 german which is “und”. “rund” is not there, closest match is that “und”. I tried to remove it, without change after reindexing.
OK so I found the problem. You’re using mb_strpos( $name, $prefix . ‘-‘ ) but this also matches any term that starts with such prefix. For example I have ‘chut’ (taste) that I want to use in the filter, but I have attribute ‘chut-kavy’ which matches the prefix.
Is the only option renaming all my attributes to use underscore instead of dash?
Forum: Plugins
In reply to: [WooCommerce] REST API: Undefined array key “ignore_discounts”Hello,
as I wrote, I simply cannot test themes and plugins on/off on this site. I can do some logging, edit Woo files to log something more, but I cannot play around with it and I cannot use a staging site because that is not connected to the external service which uses the API.
Is this even coming from Woo core, or is it possible that this variable should be set in every custom shipping method and this causes the issue?
I can confirm this beta fixed stuck migration on one of my sites (5 identical sites on identical hosting, one was just too lazy to finish ?? )
It’s a bit hidden, but thanks a lot for this!
Forum: Plugins
In reply to: [Packeta] Konflikt filtrov v objednavkachNech sa paci, kod:
<?php function display_shipping_dropdown() { if ( is_admin() && ! empty( $_GET['post_type'] ) && sanitize_title( $_GET['post_type'] ) == 'shop_order' ) { $exp_types = array(); $zones = WC_Shipping_Zones::get_zones(); foreach ( $zones as $z ) { foreach ( $z['shipping_methods'] as $method ) { $exp_types[] = $method->title; } } $exp_types = array_unique( $exp_types ); if ( empty( $exp_types ) ) { return ''; } ?> <select name="shipping_method"> <option value=""><?php _e( 'Filtrova? pod?a dopravy', 'woocommerce' ); ?></option> <?php $current_v = ! empty( $_GET['shipping_method'] ) ? $_GET['shipping_method'] : ''; foreach ( $exp_types as $label ) { printf ( '<option value="%s"%s>%s</option>', $label, $label == $current_v ? ' selected="selected"' : '', $label ); } ?> </select> <?php } } add_action( 'restrict_manage_posts', 'display_shipping_dropdown' ); function admin_shipping_filter( $where, $wp_query ) { global $pagenow; global $wpdb; $method = ! empty( $_GET['shipping_method'] ) ? sanitize_title_for_query( $_GET['shipping_method'] ) : false; if ( is_admin() && $pagenow == 'edit.php' && $wp_query->query_vars['post_type'] == 'shop_order' && ! empty( $method ) ) { $where .= 'AND ID IN ( SELECT order_id FROM ' . $wpdb->prefix . 'woocommerce_order_items WHERE order_item_type = "shipping" AND order_item_name LIKE "' . $method . '%" )'; } return $where; } add_filter( 'posts_where', 'admin_shipping_filter', 10, 2 );
Forum: Plugins
In reply to: [Packeta] Odberne miesto neumoznuje dobierkunie je to to iste co toto? https://www.ads-software.com/support/topic/nepodarilo-sa-vytvorit-zasielku/
Forum: Plugins
In reply to: [WooCommerce] REST API: Undefined array key “ignore_discounts”Hi,
as I wrote, I cannot afford switching theme or disable plugins to debug this issue which occurs only when communicating through REST API.
Is there anything I can log so it will tell me where this “ignore_discounts” is missing? I can put some woo logger calls in the code, but I can’t find where it comes from. Only thing I found (and is missing since 2.6) is missing definition of this var in WC_Shipping_Free_Shipping class.
This is actually exactly what I needed to modify the output. I’ve added “parent” to draw_child_filter_terms function and now I have full paths displayed, much easier to identify the correct category even in 3rd level ??
Thanks!
Hi @mialewp,
you should then change minimal required WP in the plugin, as it still requires 4.0 only:
WordPress Version: 4.0 or higher