I have created a popup in WordPress that will open when visitor IP is from Australia. The popup will show up on page load. I want to make it not show until the browser screen is closed. For this, I used the cookie. I set the cookie when the close button is clicked and creating the cookie in PHP using
Tag: php
Remove “Choose an option” from variable product dropdowns in Woocommerce 3
I would like to remove from the dropdown of variations in WooCommerce product page following “option”: I found plenty of, apparently not working codes which should do the job. Probably outdated to the latest WooCommerce version. What I tried and is partially working: This is only working when I se…
JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 50 of the JSON data
when i use…. i get an error => “JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 50 of the JSON data” this is my JSON data from a php script Can some please help?…. Thanks Answer it’s not a valid json, you must wrap it in array. the valid json i…
Add an additional cost to flat rate shipping each 3 items in Woocommerce
I’m running a woocommerce shop and using a Flat Rate shipping $15. I have written a formula to add $1.25 for each additional item. 13.50 + ( 1.25 * [qty]) Sipping “flat rate settings | $1.25 for …
extract 7z extension – PHP
I am wondering if PHP can extract the *.7z extension. I have searched a lot about it and I all what I see is *.zip, *.rar etc… but not 7z. Here is the code that I have tried. ZipArchive(); is not supporting 7z. I have many 7z files and I am looking to let PHP unpack them to get information
I want to to fetch 100,000 records by an SQL query using MySQL XAMPP and save in an array, but it doesn’t even fetch 16,000 and halt or shows
Fatal error: Maximum execution time of 30 seconds exceeded in C:xampphtdocsMapRoutingRouting.php Yes, I can set the maximum execution time, but I want the result in less time, like in MySQL when a person clicks on a table, it gives a result, e.g. showing rows 0 – 24 (16037 total, Query took 0.0032 secon…
Display dokan vendor name on Woocommerce single product pages
With woocommerce I am using Dokan plugin and I am trying to display the vendor name, rating and vendor location on single product pages. I tried this code to display vendor name but no luck: Any help is appreciated. Answer I don’t use dokan plugin. Here is the way to get the (post) author ID and to make…
Display a custom notice before all default notices in Woocommerce checkout page
I use the following below code for show custom message to un-logged woocommerce users (visitors) in checkout page top code recive this forum, from mr @loictheaztec my before question link below: Display a custom message for guest users in Woocommerce checkout page I would like to change woocommerce_before_che…
Laravel how to pass data from controller to modal dialogue using ajax
I have items and for every item there are related items, so when I open the homepage it shows all item, when I want to click on any item, ajax will pass this item id to controller to get the related …
Use custom meta data in a WC_Product_Query on Woocommerce 3
I used to use the standard wordpress WP_Query to fetch woocommerce products based on meta data. My products are tracks and have many meta columns (like genre, instrument, mood, etc). Using WP_Query I can create a meta_query based on user input from a form, that searches for products that meet the meta require…