I need to make certain changes to the file order-details-item.php Product prices are formed in custom meta fields. So in my case the value is: $qty = $item->get_quantity(); is incorrect. It is always the same. To solve the problem, I can use the simplest arephmetic operation. Divide the total order price b…
Tag: wordpress
Trying to get date format contact form 7 post data
$submission = WPCF7_Submission::get_instance(); $posted_data = $submission->get_posted_data(); $date= $posted_data[‘date-120’]; $date returns standard format is Ymd, how get format d.m.Y ?
Get all persons as a sum from all WooCommerce bookings
I use the official woocommerce booking plugin and I try do get the quantity of all persons that have booked a product. for a single order that’s no problem with: but how can I collect the sum of all bookings? Hope you can help me Answer To get all “complete” bookings persons count use the fo…
WooCommerce: How to change the product link conditionally?
In WooCommerce, I’m trying to change the default product link format https://domain-name.com/product/single-product-name/ for sold out products to the following format: https://domain-name.com/product/single-product-name/#reviews. So I need to add #reviews to the product link, if the product is sold out…
wordpress plugin unexpected characters
I have enqueued a php file which contains CSS. Everything works except wordpress is throwing a fit when I activate the plugin. The plugin generated 1230 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deacti…
How can I add my custom css class to all existing posts in wordpress? [closed]
I am reworking my theme on wordpress and I already have a lot of existing posts, each post has its standard class made by a wordpress and I would like to add my custom class to these all posts …
How to get current selected variable product specific data in WooCommerce
I want to access the selected product variation Weight value in php. I tried below code its getting last value of attribute, not selected. Answer The selected variation properties can only be accessed via Javascript as it’s a client side live event… Here below is an example, that will display the select…
Remove “Home” and go direct to WooCommerce “Orders” on WordPress Admin dashboard
Using the most recent version of WooCommerce, there’s a “Home” section that I cannot remove using any built in setting. I have managed to remove the analytics and marketing option, but how …
WordPress Unable to upload images
For some days now, in the admin area you have had these errors: Uncaught SyntaxError: expected expression, got ‘<‘. on files moxie.min.js, plupload.min.js, wp-plupload.min.js This does not allow us to upload images to media galleries, pages, articles… When entering in Media Gallery we hav…
Creating a WordPress URL Redirect
I’m having a little trouble setting up a WordPress URL redirect. I’ve designed an ECommerce website with WooCommerce and I’d like to add a search bar that allows me to search filter products in the shop. I’ve added the default WordPress search function and that works fine, however it d…