|

Disable double add to cart of a product

If you want to disable multiple or double add to cart quantity for woocommerce product , then you can add the following code on the function.php file. // disable double add to cart of a productadd_filter(‘woocommerce_add_to_cart_validation’, ‘my_validation_handler’, 10, 2);function my_validation_handler($is_valid, $product_id) {foreach(WC()->cart->get_cart() as $cart_item_key => $values) {if ($values[‘data’]->id == $product_id) {return false;}}return $is_valid;}

Disable Right Click and F12 Developer Tools Option

If you want to disable right-click on your website and keyboard-f-12 browser developer tools option, You can add the following code on your site. You can use this script in any script file. //Disable right click $(document).on(“contextmenu”, function (e) { e.preventDefault(); }); //Disable F12 $(document).keydown(function (event) { if (event.keyCode == 123) { // Prevent F12…

create-react-app, installation error (“command not found”)

First, install the global package: npm install -g create-react-app Then, you can create a new app: create-react-app hello-world If you still face the error ”  create-react-app: command not found (React) error” Then, follow these stpes: 👇️ clear the npx cache, for this write this command: >> npx clear-npx-cache 👇️ Then, for normal React.js project type…

WordPress online code compiler plugin for LMS
|

WordPress online code compiler plugin for LMS

An online compiler plugin that comprises the code editor and lives compiler. Using this type of plugin you can compile and run code. Here, we will discuss a plugin Code Blocks- online code compiler . After installing this plugin you will get a code editor section like this Here you can follow the documentation: https://webtoptemplates.com/codecompiler-plugin-doc/…

| |

WordPress Memory Exhausted Error

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx To solve this problem need to increase PHP memory limit: First, you need to edit the wp-config.php file on your WordPress site. It is located in your WordPress site’s root folder, and you will need to use an FTP…

How to debug wordpress site step by step

Debugging PHP code is a necessary component of any project, but WordPress has built-in debugging tools and technologies to make the process easier and more comfortable and to standardize code across the plugins, and themes. This page explains how to use the numerous debugging tools in WordPress to increase your development productivity while also improving…

how to migrate wordpress site to new domain easily by one click

It will be important to move your website when you switch web hosts. While the website migration procedure is very simple, it is critical to complete it correctly in order to maintain your data and the site’s performance in the future. This post will walk you through four different ways to migrate a WordPress site…

| |

How to Autocomplete WooCommerce Orders- 2 Easy Ways!

Instantly confirming a customer’s purchase is one of the best ways to improve the customer experience in your store. They will be able to access their stuff as soon as their orders are completed. So, in this piece, we’ll teach you how to autocomplete WooCommerce orders using various ways. We recently discussed some of the…

wordpress 5.9 warning issue solution

( ! ) Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘_disable_block_editor_for_navigation_post_type’ not found or invalid function name in /Users/joomshaper/Local Sites/lms/app/public/wp-includes/class-wp-hook.php on line 307 You can use this code in your wp-config.php file. Just go to your WordPress installation directory. Here you can find the wp-config.php file. For more details watch this :