Dmitry_Demir
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Configuration ErrorsAh, got it. I see that you highlight the field that is causing the error (and I was right, it is the difference in domain name). I still think it would be great if you’d add the list of errors next to the global notice (the one where it shows the number of errors and the link to the documentation).
Forum: Plugins
In reply to: [Contact Form 7 - Dynamic Text Extension] shortcode deprecated since CF7 4.6Hey, everyone.
I fixed this error by changing 2 lines in the plugin. Just in case, the plugin file is located in \wp-content\plugins\contact-form-7-dynamic-text-extension\contact-form-7-dynamic-text-extension.php.
Changed line 39 from
wpcf7_add_shortcode(
to
wpcf7_add_form_tag(
Changed line 44 from
$tag = new WPCF7_Shortcode( $tag );
to
$tag = new WPCF7_FormTag( $tag );
I hope this is gonna be fixed in the next update…
- This reply was modified 7 years, 11 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [Contact Form 7] contact form 7 has deprecated functionOops, that post was meant for Contact Form 7 Dynamic Text Extension thread, sorry. Shouldn’t type in a hurry…
I think in most (if not all) cases a search and replace for
wpcf7_add_shortcode
andWPCF7_Shortcode
should fix the error. Sublime Text does this job very fast. Make sure to notify the plugin creators about the needed changes though.- This reply was modified 7 years, 11 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [Contact Form 7] contact form 7 has deprecated functionHey, everyone.
I fixed this error by changing 2 lines in the plugin. Just in case, the plugin file is located in \wp-content\plugins\contact-form-7-dynamic-text-extension\contact-form-7-dynamic-text-extension.php.
Changed line 39 from
wpcf7_add_shortcode(
to
wpcf7_add_form_tag(
Changed line 44 from
$tag = new WPCF7_Shortcode( $tag );
to
$tag = new WPCF7_FormTag( $tag );
I hope this is gonna be fixed in the next update…
- This reply was modified 7 years, 11 months ago by Dmitry_Demir.
- This reply was modified 7 years, 11 months ago by Dmitry_Demir.
- This reply was modified 7 years, 11 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [WooCommerce Products Per Page] Changing HTMLHi, Jeroen!
Thanks a lot for showing me the right direction ?? There is a typo in your example in
fronte_end
and it doesn’t work with priority 30 (I’m a bit puzzled with why though), but it works with priority 25 (same as the hook was added in the plugin). So here’s what I ended up with:add_action('woocommerce_before_shop_loop', 'remove_page_dropdown'); function remove_page_dropdown() { remove_action('woocommerce_before_shop_loop', array( Woocommerce_Products_Per_Page()->front_end, 'products_per_page_dropdown'), 25); }
Now I copied
products_per_page_dropdown
function to my function’s php and added it after removing the original one, it works like a charm with just one change – I had to replace$this
withWoocommerce_Products_Per_Page()->front_end
. That’s kind of a side note if someone is going to do the same and comes across this thread.Thanks again for helping out and good luck with further development!
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationI’ve found the reason. That’s how I registered my sidebar:
register_sidebar( array( 'name' => 'Product filters', 'id' => 'product_filters', /*'before_widget' => '', 'after_widget' => '',*/ 'before_title' => '<div class="hidden">', 'after_title' => '</div>', ) );
The commented out part is what was causing the issue with missing id’s. I thought when it’s empty it just means that WP will not add any wrappers around them, turns out it also removes them… So without these 2 lines the markup is fine.
However, I still need to move “wcapf-before-products” wrapper elsewhere, because with my custom theme it wraps filters before products and not the products. I guess it should be fine with the default Woocommerce layout, so there’s no need for changes in plugin’s core. I’ve found where this wrapper is hooked, but I can’t remove these hooks in my theme’s functions.php. It works perfectly if I comment out these 2 lines in plugin’s hooks.php:
add_action('woocommerce_before_shop_loop', array('WCAPF', 'beforeProductsHolder'), 0); add_action('woocommerce_after_shop_loop', array('WCAPF', 'afterProductsHolder'), 200);
Here’s what I tried in my functions.php:
add_action('woocommerce_before_shop_loop', 'my_before_shop_loop_remove'); function my_before_shop_loop_remove() { remove_action('woocommerce_before_shop_loop', array('WCAPF', 'beforeProductsHolder'), 0); } add_action('woocommerce_after_shop_loop', 'my_after_shop_loop_remove'); function my_after_shop_loop_remove() { remove_action('woocommerce_after_shop_loop', array('WCAPF', 'afterProductsHolder'), 200); }
But it doesn’t change anything. I’ve also tried higher numbers for priority with no result. What am I doing wrong?
- This reply was modified 8 years, 2 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationNever mind about the markup, I’ve found a shop that’s using your plugin, so I’m going to compare it with mine. So far there are quite a few differences…
- This reply was modified 8 years, 2 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationThen again, if I remove this wrapper, then wcapf-before-products wraps all products. But it should only wrap the filters before products, right?
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationAlso it looks like div with class “wcapf-before-products” is not closed, which breaks my markup a bit… I’ve put the output of woocommerce_before_shop_loop into an additional wrapper, I think this is conflicting with plugin’s markup…
- This reply was modified 8 years, 2 months ago by Dmitry_Demir.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationHi,
Sorry for a delayed reply, got back to work on this issue only now…
It looks like some classes are missing in HTML and so some (or maybe even all) JS events don’t get triggered. For example, your JS has the following:
$('.wcapf-ajax-term-filter').not('.wcapf-price-filter-widget').on('click', 'li a', function(event) { event.preventDefault(); var element = $(this), filter_key = element.attr('data-key'), filter_val = element.attr('data-value'), enable_multiple_filter = element.attr('data-multiple-filter'); if (enable_multiple_filter == true) { wcapfMakeParameters(filter_key, filter_val); } else { wcapfSingleFilter(filter_key, filter_val); } });
But there’s no
wcapf-ajax-term-filter
class in my HTML. Do you have a demo link where I could compare the HTML with what I get?Forum: Plugins
In reply to: [WooCommerce Products Per Page] Changing HTMLAs for changing the HTML, I thought of making a new class that would extend WPPP_Front_End and overwrite the products_per_page_dropdown function the way I need it, then I’d hook it instead of the default. But I’m not sure if that’d actually work.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Problem with activating the pluginhordy0, you need to update your PHP to version 4.4 or higher (contact your hosting provider for that if you don’t have proper access). Even though it’s more or less hosting related issue, it would be nice if plugin’s code would be compatible with older versions of PHP, especially since 4.3 is quite popular.
You can also try to modify the plugin to make it work, here’s a link to my ticket, where I provide a solution, however it looks like there are more issues than just that: https://www.ads-software.com/support/topic/fatal-error-on-plugin-activation-12?replies=6
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationAttributes filter still doesn’t seem to work though. It lists available variations properly, but nothing happens when I click on them.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationYeah, such assignment is illegal in PHP <= 5.3 and I’m running 5.3.28 on this server. I know it’s not as clean as one-liner, but I (and probably some other users that run PHP 5.3 or older) would appreciate if you’d change that, so I could update your plugin in future without having to rewrite these assignments.
Forum: Plugins
In reply to: [WCAPF - WooCommerce Ajax Product Filter] Fatal error on plugin activationNow I changed
$chosen_filters = $this->getChosenFilters()['chosen'];
to
$chosen_filters = $this->getChosenFilters(); $chosen_filters = $chosen_filters['chosen'];
in wcapf.php on line 361 and
$active_filters = $wcapf->getChosenFilters()['active_filters'];
to
$active_filters = $wcapf->getChosenFilters(); $active_filters = $active_filters['active_filters'];
in widget-active-filter.php on line 37.
I didn’t change anything other than that. Now the fatal errors are gone and the plugin seem to work properly, but I’m a bit puzzled why it didn’t work like it was. Could it be because of the PHP version on my server? In any case, maybe it’s better to include it in the next plugin update to avoid errors with similar setups.