I’ve looked around on Google and the WooCommerce docs, but I feel like I’m not using the correct terminology here. Hopefully one of you can point me in the right direction. I need to add a column to the cart table (not sure what it’s actually called) that is populated on checkout pages, for example on the checkout/order-pay/ endpoint. You
Tag: wordpress
Display content on WooCommerce single products based on product categories when they have child categories
I am trying to display the test div below on any product page that is in the category cat1title or cat2title. Using the hook below, which I thought was correct, I should be seeing this div on the page but I am not seeing it at all. The page displays just fine but no div. No errors in the console
How to return only the last counter value in PHP for a custom field
How do you fetch the last value only from the following code. At the moment, this code prints all the rows but I just need to echo the last number only. I am using a custom repeater field that allows multiple uploads so I need the $counter variable to return the last number which I can then concatenate with Documents
Customize “subsription option” string generated by WooCommerce Subscribe All The Things plugin
I am trying to add text through functions.php just after subscription-price”> I can do this with direct code editing, but need help to apply filter through functions.php without changing orignal files. something like that Answer This should suffice, basically anything you assign to the $option_descreption variable will be displayed Replace Your new text in this answer, depending on your needs
Display subscription renewal count on WooCommerce “My account” page
We use WooCommerce subscription and I created that snippet below to display the renewal count on MyAccount page. This is working. But, I found out, that the initial parent order also count as a “paid”. So actually I only want to count the renewals from a subscription means exclude the initial order from that count. I guess when I always
End excerpts with a full sentence for specific post types
I am trying to make excerpts end with a sentence, for a specific post type on my website, but for some reason, it is also effecting page excerpts and I cannot understand why. It doesn’t effect any of my other custom post types, just the one I specify in the function, and then all pages on the website. It still
Replace ALT attribute with image caption + ACF relationship URL if it exists
I have this WordPress function working, but it has 1 obvious issue in testing and I’m sure many other formatting issues. I’ve pulled this function together from various pieces but would greatly appreciate feedback on cleaning it up. Purpose of the function Modify ALT attribute of any image in a WordPress gallery Get image caption field and add to ALT
How can I automatically add random description to posts with empty content posted to WordPress?
I would like to automate the process of adding descriptions for articles published on my site. I would like to automatically insert a random description from a list of pre-edited (Advanced Custom …
Betheme WordPress How to hide or Remove Admin menu Items
I am using currently Betheme Wordpress and I want to remove admin menu Betheme li Items Kindly view the image what i want is also defined in image Answer I have found the solution and its workig 100% 1st step open this file projectName/wp-admin/admin.php then 2nd Step in footer of the page insert this code Enjoy My Solution …
Woocommerce Shipping method based on user role
I want to enable or disable Shipping Methods, according to user role. I have tested various different codes and approaches, none of which have worked so far. The current code: (source: stacklink ) (Have tested the original snippet as well, without changes, accept for the user role ) Does not work for me. I tested it with ‘local_pickup’ as well,