-
Insert new woocommerce product programmatically
How to insert brand new Woocommerce product programmatically? Sometimes you need your own product importer. You may read database, XML, JSON, CSV, XLS, XLSX, ODS, absolutely anything. Now you got all your products in memory or cache or your temporary file and what’s next? You need to add this product to Woocommerce… Well, the product is – like almost anything in WordPress – post type with specific taxonomy and meta data set. So, first things first, insert your new post: [crayon-662286c15e024824220056/] Of course this is not everything, that would be too easy. Now we need to add some meta information to the product post and that is why, we take…
-
Brand new beta 2
Today WordPress team announced WordPress 4.5 beta 2 release. Three small modifications and over one hundred bug fixes are here. I use nightly builds on my local server but it is always safer to run beta versions, so feel free to upgrade.
-
Woocommerce product category fields
Yeah, we step into Woocommerce chambers. This is a huge, good plugin, widely recognizable, used on many many e-commerce sites. They got nice product category taxonomy and it works fine. But what if we need a few more fields? It’s not that hard as you may think so, because Woocommerce is well written plugin, we can hook into it without any trouble. We need four action hooks and three functions. I will use methods, because I prefer object oriented programming, but it’s pretty easy to convert it into functional programming. You may ask, why only three functions, when we want to use four hooks? Two hooks will be handled by…
-
WordPress 4.5 Beta 1
As I mentioned before many times, I use newest PHP/Apache/SQL versions as possible for my local servers. This is the best thing you may do for testing and make sure that your sofrware will work on every posssible update that waiting for your clients. So, I use WordPress nightly builds and here we are – we’ve got first beta for WordPress 4.5. You may find a lot of new things here, for example native theme logo support, new class for multisite operations, better image handling, a few improvements and shortcuts for editing and new inline scrpt loader “wp_add_inline_script()“, similar to wp_add_inline_style() and a lot more.
-
New PHP7 release
Just a few days ago, I wrote about me using PHP 7.0.2 at home and voilà – yesterday PHP team has just announced PHP 7.0.3. Of course I upgarded my local servers and now I got PHP 7.0.3 to deal with. To be honest, I heard a lot about PHP7 speed improvements, and I can agree with that – it’s faster. And it is worth to use it. And I think it will gain popularity over the months. I think we may say bye, bye to PHP 5.x.
-
WordPress 4.4.2
We’ve got a new WordPress release. It is mainly for security (two issues fixed) and some other bugs fixed (seventeen as far as I remember). This version should update automatically, however check in all your WordPress sites to see if it is really 4.4.2.
-
What PHP version do you use? Part 2.
Well, it’s tricky question. I always try to use as newest as possible. First of all, it gives me a lot of brand new features. Secondly, I can assure myself compatibility. I know that my scripts will work even is someone somewhere will upgrade one’s server. So, my provider gives me PHP 5.2.x, 5.3.x, 5.4.x, 5.5.x, 5.6.x and – for testing purposes – 7.0.x. I use 5.6.x because I’m not sure about their plans about upgrading PHP7. Sometimes I got client, who has PHP 5.4 and I have no choice. Of course I may tell him, that this is obsolete, but you know clients… At home, as a local developer…
-
Google Analytics Head 1.4.4.1
Hi there folks, we’ve got brand new Google Analytics Head plugin for you! There are some big news in this version. First, adding plugin name to the tracking code is optional and disabled by default. Of course it’s nothing big. Big thing is, I’ve added two action hooks and one filter. And one, very important thing – triggering those actions and filtering may be enabled/disabled in options screen. So, if you want to interfere with Google Analytics Head plugin, ask your user to enable firing actions! Examples: [crayon-662286c21b6d1023184687/] [crayon-662286c21b6da488057454/] [crayon-662286c21b6dc129311366/] Notice 1: all that examples will work, if you enable triggring actions and use filters. If you don’t, it won’t…
-
Security release 4.4.1
Hi there, on Jan 6th, we get new WP security release – version 4.4.1. It should update automatically, so… keep it in mind but if you already have a newest version, it should be updated.
-
WP_Import has a deprecated constructor in…
Some of you gets this annoying notice: Methods with the same name as their class will not be constructors in a future version of PHP; WP_Import has a deprecated constructor in …\public_html\wp-content\plugins\wordpress-importer\wordpress-importer.php This happens if you set your WP_DEBUG constant to true, use PHP7 and run WordPress import plugin. It is only a notice, but still it is annoying. What to do? Well, this is the rarest case, when you have to enter into source-code. Why? Well, fist of all, we need to make a very small change. Second, those change won’t in fact change anything here. And last but not least – even if this plugin will be updated,…