Snippets

Using WC_Order_Query to Find Subscriptions

Today I noticed a question in the Advanced WooCommerce group on Facebook. Someone was asking a question about how to use the WC_Order_Query class to find subscriptions. I am using to return a list of orders (seems reasonable!). But I’d like to exclude subscriptions. My current query uses type = ‘shop_order’, which returns all orders

Using WC_Order_Query to Find Subscriptions Read More »

Cart Fees

Do you need to add some type of fee to your shopping cart? An extra line item not associated with a product? In the following article I’ll show you a couple ways this can be accomplished. The above code includes two examples. The first example adds a simple “Special Handling Fee” of $5.25 to the

Cart Fees Read More »

Allowing the Editor Role Access to Gravity Forms

Site security is always an important subject. And sometimes security gets in the way of letting users do what they need. I had a client recently ask about increasing a user’s role to Administrator in order for them to be given access to Gravity Forms. But rather than giving a user access to areas of

Allowing the Editor Role Access to Gravity Forms Read More »

Show Post View Count

Have you ever wanted to display a count of the current post’s views? Here’s a small code snippet that you can add to your site to accomplish this: In this example, I’m using the ‘genesis_after_content’ action to hook into a point within the Genesis Framework’s actions in order to display the view count after the

Show Post View Count Read More »