I have 3 ticket products in WooCommerce and want to add a name field per ticket product purchased – so if a customer buys three tickets 3 name fields are displayed to fill out in the checkout. The code below works: But this includes all products added to cart – how can I target specific Product IDs to be only
Tag: wordpress
How to rename all action and titles of WooCommerce product post type
Im using WooCommerce Plugin, and instead of the product I want to rename all titles and actions to Donations. this is what i have tried : I feel this is a very Clumsy and long way and maybe there is a better way or a plugin to rename/translate? Answer Add this to your active theme functions.php file
Get all products matching an attribute through WooCommerce API
I would like to find a way to get all the products that match an attribute brand = 226Ers. For example. I am using the automattic/woocommerce package. I have tried a thousand ways but none of them work. I have looked at the documentation and checked the internet but I can’t find the way to do it. Here is an
unexpected integer “1” wp-includes/pomo/mo.php on line 105
Checked on my WordPress site today to find an HTTP 500 error. Line 105 in that WordPress file is: WordPress version 5.9.3 PHP version 8.0.3 Answer My local wordrpess has this as that line… I think your file has been tampered with
How can I get the id of a user just by writing their email in php? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 months ago. Improve this question I am creating an endpoint to be able to send an email to a user in case they have forgotten
Change shipping cost for specific countries based on total orders by customer in WooCommerce
I follow this thread that works perfectly: Set discount based on number of orders in WooCommerce. But in my case I need to apply the discount not to the order total, but to the shipping cost and I would like to do this only for a specific country, specifically UK. For example: ONLY First order: 6€ (flat rate shipping cost)
Using an ACF text field to display metatag on specific pages. Can’t get the acf field to return correctly in functions.php
I am in the process of implementing ios smart banners on our site, however we only want it to display on selected pages. I have set up an ACF text field, where I have the page IDs as a comma separated string ( eg: 1234, 1235, 1236, 1237 ). In the functions.php file I have created the following function to
I am trying to load the script into my Elementor Widget and i am getting a Failed to load resource: net::ERR_CONNECTION_REFUSED on my WordPress
Error screenshot Failed to load resource: net::ERR_CONNECTION_REFUSED Answer It is properly enqued already and the errors you’re getting are for the different script and the script you’ve enqued are already showing the Console.log() test message you’ve added. I see there is no problem with enqueing the script, you might be dealing with some other issue, please continue with debugging.
How can I remove duplicate record in php (Array unique)
I have an array of records and I want to remove the duplicate record. I know we can use array_unique() to remove duplicate value but in my case I have an array of records like(Date, Url, xyz). I want to skip the date column while checking the duplicate record. You can check my code bellow. You can check that i
WooCommerce Filter products with ACF and Product Category
I am using WooCommerce to display a product loop and have built out a filter for the same loop. The filter uses acf meta which the values are pulled directly from the query string. The meta_query is working as expected, however the tax_query seems to be not ineffective. I need some assistance as to why my tax_query is not producing