Skip to main content

Posts

Showing posts with the label wordpress

PHP 8 deprecates in Wordpress: class-wp-list-table.php:717

There has been released latest versions PHP 8.0 and 8.1 but Wordpress and some of its plugins are not ready to convey the patterns provided in PHP 8. I just found today that after upgrading a website from 7.4, a lot of error notifications appeared everywhere in the website when enabling of debug mode. However, we will focused on the given title in this blog as important matter in order to check the status of the orders if approved, pending or cancelled. This content lets you spend very short time in finding out errors in Wordpress 6.0 with PHP 8.0 most specifically the one I had figured out from this notice "Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /www/.../wp-admin/includes/class-wp-list-table.php:717". However, in our case, the website has an installed plugins "Advanced Custom Field Pro" and "Woocommerce 7.3" which combined to manipulate order statuses. The website has an e-commerce platform that vi...

Remove unused Wordpress stylesheets and scripts - Just code it!

  Just have found a good way to remove unnecessary css and js links on your website header. If you aren't familiar with a good page load auditor, you might visit Gtmetrix.com , Pingdom.com , and Google Page Speed  to check your site's performance. Unused CSS and JS scripts makes your site's page load so heavy and sometimes it turns over 10 to 30 seconds to display your frontend on the browser. Thus, this way could also give you more idea on how do you manage your site's performance.  I have tried several times the use of  wp_dequeue_style()  functions both in my child and parent theme but didn't worked. However, I never liked contact form 7 to run out in my front-end since before I get into Wordpress platform so I often removed it by adding code define( 'WPCF7_LOAD_CSS', false )  into wp-config.php just below define( 'WP_DEBUG', false ) . So let's get started. You must first check the running css on your front-end on browser element inspector. On...

Deprecated add_to_cart_fragments, fix it!

ISSUE (error) : The The “add_to_cart_fragments” hook uses out of date data structures and function is deprecated since version 3.1.2. Replace with woocommerce_add_to_cart_fragments The function ‘add_to_cart_fragments’ is an outdated woocommerce function. Woocommerce version 3.0 and above have changed the filter to ‘woocommerce_add_to_cart_fragments. If your WordPress, themes and plugins are outdated then this problem could be easily fixed by updating your website in just a click! If you’re having trouble with this on your website’s “error_logs” while your website is up to date, you should find where the “add_to_cart_fragments” function is located. See the photo where I found “add_to_cart_fragments” On my end under the ‘Essential Grid’ plugin. add_to_cart_fragment filter I replaced the “add_to_cart_fragments” to “woocommerce_add_to_cart_fragments” then finally the error_logs is now clean!   Please take note:  review first the file class-wc-deprecated-filter-h...

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 768401 bytes) in /home/{host_name}/public_html/wp-includes/wp-db.php on line 1173

Memory Exhausted? This error appears when Wordpress users trying update multiple themes or plugins in the same time. This is not a biggest problem and changed nothing from website's data such as from pages, posts, media and etc. By fixing this problem, go through the hosting site's control panel and proceed to 'PHP Version'. Attached photo is an example in Godaddy. Breadcrumb: Manage Hosting > Control Panel > Select PHP Version => Switch to PHP Option If a user is using other hosting away from Godaddy Hosting, below code should be enter to PHP.ini or user.ini located under the root directory of the site: max_execution_time=3000 max_input_time=3000 memory_limit=3000 post_max_size=3000 upload_max_filesize=12M There's also an option for editing .htaccess under /public_html, Wordpress module might not be included if it exists: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [...