jorijnsmit
Forum Replies Created
-
Cheers bro.
Forum: Plugins
In reply to: [WooCommerce] [Plugin: WooCommerce] Check out Not worknigI tried debugging with the JavaScript console first but this gave me an 500 internal error pointing to jquery.js. Diving into that file (8000+) lines is not fun.
Switching on
WP_DEBUG
helped a whole lot more. Turned out I made a mistake in one of the custom e-mail templates…Sounds amazing, when is it up for grabs?
I couldn’t find a repository for your plugin, is it available somewhere? Would be nice to develop it with you :-)!
For plugin developers see this article on how to make language files in your plugin folder backup proof.
Basically you add this to your functions.php:
public function load_plugin_textdomain() { $domain = 'my-plugin'; // The "plugin_locale" filter is also used in load_plugin_textdomain() $locale = apply_filters('plugin_locale', get_locale(), $domain); load_textdomain($domain, WP_LANG_DIR.'/my-plugin/'.$domain.'-'.$locale.'.mo'); load_plugin_textdomain($domain, FALSE, dirname(plugin_basename(__FILE__)).'/languages/'); }
This way your plugin will look for a language file in
WP_LANG_DIR.'/my-plugin/
first before checking the ‘local’ language folder.Good point, probably not everyone is going to check the project’s wiki on GitHub by themselves.
You are welcome!
I think you are right about the fact that the difficulty of manually defining the .less sheets isn’t too much for people already coding LESS or their own theme.
I read your admin panel feature after I proposed the
/less/
idea and think it is better, although you can again ask till what extend it is necessary.Only question that remains for me is why the .css files are written to a separate folder and have a random string attached? Them popping up next to the .less files with the same filename would appear more intuitive to me.
I just wrestled a bit with this plugin and got it working. Indeed it is very easy to use and requires almost no configuration. I am now coding directly in LESS and refreshing the page automatically generates appropriate CSS files. Amazing!
However I do think some changes in the instructions would be of a lot of help. First of all I noticed that the code you use in your wiki is not valid; be aware of the difference between using ‘ and ` and ‘.
More effectively would be a more foolproof approach for people not wanting to dive into the code. I am thinking defining a folder (let’s say /less/ in the theme directory) in which .less files will automatically be wp_enqueued. Another option is an interface for the plugin in which the LESS files can be defined.
Let me know if I can help with any of these things, really like this initiative!
Forum: Plugins
In reply to: [WooCommerce] [Plugin: WooCommerce] Check out Not worknigChrome console gives me this error:
POST https://[...]/wp-admin/admin-ajax.php?action=woocommerce-checkout 500 (Internal Server Error) jquery.js:4 send jquery.js:4 f.extend.ajax jquery.js:4 (anonymous function) checkout.min.js:1 f.event.dispatch jquery.js:3 h.handle.i jquery.js:3
Note that the order does show up in the orders admin panel. E-mails however are not sent.
Switchting to a default theme seems to fix the problem. Now on to debugging my custom theme…
It’s not a drop down menu but just a simple checkbox: screenshot.
Edit: I was able to hide the tab now by adding this to the bottom of woocommerce.css:
.woocommerce_tabs .tabs { display: none; }
Although probably not the neatest solution it does do the trick.
For some reason disabling the reviews tab also disables my review panel…
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 ); //remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30 );
This is interesting because the other way around it works as expected; disabling the panel doesn’t display the tab:
//remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 ); remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30 );
Am I missing something? Note: I want to display ONLY the reviews themselves, so I also disabled the attributes and description tab:
// remove product attributes tab remove_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 ); remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_attributes_panel', 20 ); // remove product description tab remove_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 ); remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_description_panel', 10 );
(Credits go to from https://www.wpflexishop.com/snippet-tag/woocommerce/ for getting me so far)
Thanks a lot this worked for me too.