I have the code below which triggers when a button is pressed in the WordPress admin panel. This opens a csv file called ‘ss-stock-export.csv’. How can I save this file to my server in my uploads directory at wp-content/uploads/exports/? I tried to use file_put_contents but that doesn’t seem…
Tag: wordpress
WordPress functions.php child theme
Actually i’m building a Website using WordPress, everything work, but now I need to add some change inside of the functions.php, the original one in the parent folder, so how should I do ? Is it possible to copy everything inside of the functions.php child theme and then add changes ? I don’t want…
how to get particular product quantity from the cart page in the woocommerce
With this code: foreach ( WC()->cart->get_cart() as $cart_item ) { $quantity = $cart_item[‘quantity’]; echo $quantity; } I can get the quantity of all the products added in cart but I …
User Role Select on Woocommerce Registration Stopped Working
I use a drop down menu to select between two user roles on my Woocommerce registration form. After updating to Woocommerce 3.0.8 the drop down menu stopped working and I cannot figure out why. Below is the code I’ve been using. Any ideas? Answer I decided to scrap the old code and replaced it with the f…
WooCommerce 3.x – Hide category of product
I would like to know if anyone has a clue on how to hide a specific product category all around my website. Means on the “shop”, “related product” and the “search” of my WordPress WooCommerce website. For the “shop” pages I have done (and it’s working) the…
woocommerce_cart_calculate_fees load after woocommerce_before_cart_table
I have a problem trying to do some calculations with woocommerce_before_cart_table custom values and passing them to woocommerce_cart_calculate_fees. The problem is that woocommerce_before_cart_table is loading first and I am not able to pass that values from woocommerce_before_cart_table to woocommerce_cart_…
WooCommerce Show Product Total Sales after Custom a Date in Frontend
I want to show product total sales after custom date: I have this code, but I would like to custom it for showing only the total sales after a custom date for example 05/26/2016 Answer total_sales holds the total sales count of all time, So you need to write custom query to get sold count between specific dat…
Is there a way to Export Product Variations from WooCommerce and into a ‘.csv’/Excel file?
I am currently working on a WordPress website, with WooCommerce functionality. I would like to provide the client with a full breakdown of all the product variations that are currently on the website. For 1 product alone, there are over 500 Product Variations. Rather than type all these up manually, is there …
Adding an image near the footer on WooCommerce completed orders email notification
I’m trying this code to insert images just near the footer in WooCommerce completed orders email notification, but unfortunately it doesn’t work! Here’s the code I’m trying: Any Clue please? Thanks Answer You should better use a custom hooked function in woocommerce_email_customer_deta…
Using datatable for existing html table (using database connection) in wordpress
I currently have a WordPress site with a section that has a main HTML table which has a basic header of 7 columns and the rows are all filled from database variable. It works perfectly now, where if I add 8 more records to the database, it pulls those and displays them in the table with no problem. I’ve…