Every out of stock product says “Out of Stock” There are plenty of functions.php scripts that overwrite the text but I am only trying to overwrite the text specific to “Category A” or if I know the category “id” number, that could work too. I found this script but it allows…
Tag: wordpress
Woocommerce Change product price by ID
I have an array with product id (post_id). My goal is to loop thru this array and change all the product prices in WooCommerce products. Here is my attempt: foreach ($array as $product) { …
Hide coupon discount raw if no coupon has been applied on WooCommerce cart page
I add coupons and discounts total savings to my cart page. My code works fine but I have an additional question. This is the code I am currently using: add_action( ‘…
Workflow to use for custom wordpress theme development? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question I am starting out in webdevelopment & wordpress, with prior basic…
Error when removing a produсt from favorites (I created the wishlist system myself)
guys! I faced some issue again. For a project on WooCommerce I created the custom system favorite products. The default one did not suit us.I could implement the addition created this code: Button for adding to the favorite list The jQuery code The code in function: But I have not thought about the removal sy…
How to exclude a specific category from blog posts
How to exclude a specific category from blog posts in WordPress but if a blog post has two categories selected, one from excluded category and the other from included I would like to show the blog post. I tried using this function in function.php, it hides the excluded category but when two categories are sel…
Modify empty keys in associative array in php
i have a really long form in wordpress that it filled out by the user and then submitted to a thirdparty crm via API. The thing is if user doesn’t fill a field, these field will be false or empty and remote_post will fail. I tried to add a custom value to empty fields with a foreach but they are
WooCommerce changing order line totals
I have a plugin which applies discounts based on the category of the product. I’m using the filters below to add text to the order table in the cart: And this action to change the total price of the order/cart. The total price of the order pulls through to the checkout, as do the modified product fields…
Apply a welcome discount to non “on sale” items in WooCommerce
I use this code to set up a “welcome” discount for a registered user: add_action( ‘woocommerce_cart_calculate_fees’, ‘personal_discount_based’, 20, 1 ); function personal_discount_based( $…
WordPress add_filter(‘query_vars’, ‘my_new_vars’); not working as expected
I have an issue with WordPress (there’s a shocker), where it removes my get parameter, which i understand thats a WP feature for security and some other reasons. What i’m trying to achieve is the following: Load product page When customer clicks book now they are redirected to an enquire now form …