Ok so I am testing my ajax callbacks for my wordpress plugin. So I basically followed instructions here https://codesymphony.co/wp-ajax-plugin-unit-testing/ Here is my ajax callback function Here is my test Now here are the issues It doesn’t throw WPAjaxDieStopException exception like its suppose to whe…
Tag: wordpress
How to display custom sidebar in specific WooCommerce category?
I have specific question about WooCommerce plugin. I am using WooCommerce Product Categories widget to show category menu on the left sidebar. On my website I have a category for special offers (which contains some subcategories and products) and I want other categories to be hidden from Woocommerce Product C…
WooCommerce hide order item meta from front end (not admin)
I have a couple of order item meta details that I would not like the customer to see (on the view orders page under account info). I have found a filter that will remove this data from the ADMIN (…
WordPress – Logout redirection based on role
I’m trying to determine how I can redirect users upon logout, to a URL defined by their role. Simply put, I want to redirect admins (as well as editors) that logout to a different URL, than subscribers / privileged users. I’m using the following code to redirect users at logout right now, but this…
Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type
I want add a custom Button “View Demo” next to “Add to Cart” button of WooCommerce based on Product Type, both on main shop page and single product page. I’ve done this steps: Add code to theme file …
lessphp fatal error: load error: failed to find error after migrating wordpress website to new server
We are seeing the following error after migrating a WordPress site from one server to another. The domain in question is on a parked testing domain (cerwebtest.net) and you will see the error at the top after clicking on any page other than the homepage. We have updated all plugins / WordPress to latest versi…
WordPress plugin install: Could not create directory
I’m using WordPress on centos 6. I try to install a plugin. But I got this error: Installing Plugin: bbPress 2.5.9 Downloading install package from https://downloads.wordpress.org/plugin/bbpress.2.5.9.zip… Unpacking the package… Could not create directory. How can I resolve this? P/S: I run this command…
WooCommerce: Set country by default in checkout page
I am using WooCommerce in my WordPress web site. The customers billing and shipping details are populated by default on checkout page. I want that the country will not be set by default. Instead it …
The uploaded file exceeds the upload_max_filesize directive in php.ini error while uploading plugin
When I tried to upload a plugin for my WordPress template in wamp 2.0 I got an error: The uploaded file exceeds the upload_max_filesize directive in php.ini How to fix this error? Answer Seeing as though you’ve mentioned WAMP, I’m going to assume you can edit the php.ini file? If you left click on…
WordPress: how to hide toolbar in post editor?
I have a Custom Post Type (Products) in my WordPress web site. This is a WooCommerce Product, if it’s necessary to know. I need to hide toolbar (1) into wp-editor on Add Product page. Also I need to hide “Add media” button (2) and “Visual/Text” tabs (3). How do I hide them? Maybe…