I am trying to add a line of text under the price of my featured products on my homepage. I have tried editing the content-widget-product.php so it looks like this – I added the “Delivery throughout line”… but it doesn’t do anything though. Can someone please tell me why it’…
Tag: wordpress
Display the stock availability for all product types in Woocommerce archive pages
I am using this code in showing the stocks of products: And if the product is a variable I use this answer code to display the stock availability: Get the total stock of all variations from a variable product In Woocommerce How can I merge this codes in a single conditional function? For example. if the produ…
Trigger email on order custom status change in Woocommerce
I’ve created a custom email class and added it to WooCommerce. When I go to the emails setting in WooCommerce I can see my template there and when I trigger it manually the email arrives at the target email account. Now I have the problem that I’ve added a action to my class which should detect th…
Change gallery thumbnails count & number of related products in Woocommerce [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 4 years ago. Improve this question In Woocommerce I would like to show 3 thumbnails on single product the gal…
How to hide specific page (from wp-admin) for certain users in wp?
My Image I just wanted to hide specific page for certain users. function remove_menus(){ // get current login user’s role $roles = wp_get_current_user()->roles; // test role if( …
Add a column with coupons used on admin Orders list in Woocommerce
I am trying to display the coupon(s) used directly on the order admin screen (where all orders are listed in WooCommerce) but for some reason it’s giving me a fatal error because of the break. Here is the code -> Any ideas on how to fix this would be very much appreciated. Answer There is some errors…
Avoid cart items price update for specific product categories in Woocommerce
I am using below script under my WordPress child theme functions.php to overwrite price, but below code is affecting to all the products. Can you please help me “not to run” below code if the product is under some specific “shirts”, “games” category? Above code is working s…
Change product stock availability texts in Woocommerce
I am trying to change the in stock text next to the quantity available in woocommerce. I am using the stock management in product variations. I tried this code below: The code above changes the text but it does not pull in the stock quantity number from the variation stock manager. Any help is appreciated. An…
Set a variable of a class in another class
I have a class address_book in which I want to set $DBConnection using method from another class: Another class: So var_dum should return ‘1’ as it has to be assigned to protected $DBConnection; in the first class. I’m starting my learning of PHP OOP so probably everything is bad. Any way it…
Add the variation price to variable product dropdown item names in Woocommerce
I’m using this code to get the variable product options I tried a lot of codes to get price next to the name in dropdown menu , but nothing get right Answer It will only work if you have just one product attribute for variations set in the variable product (so only one dropdown). If you have more than o…