On the WooCommerce cart page I want to hide: “remove item” button “quantity input” field For items that will go in the comment of // HIDE REMOVE BUTTON & QUNATITY OF THESE ITEMS in the code below Can someone walk me through how to do that? Answer A first option is to hide these fields via jQuery and CSS. You
Tag: woocommerce
Check if WooCommerce custom order status exist to execute code
I am creating woocommerce plugin and I have a custom order status “wc-shipped”. I want to execute some plugin options for this custom order status only. Here is my code I want if “wc-shipped” status exist then show these plugin options but I am getting below error. How to fix this ? Answer Your hooked function has 2 variables (arguments),
Woocommerce Product Category taxonomy in Admin Pages
I’m writing a plugin for WordPress using WooCommerce. I need to get the list of WooCommerce Product Categories (taxonomy ‘product_cat’) in the admin page of the plugin (note the emphasis on “…
Add checkout custom fields data to shipping packages for calculations in WooCommerce
I’m creating a plugin that will calculate custom shipping variants with API. I have a jQuery script that calculates postal and fias codes based on an entered address. $(“#billing_address_1”)….
Sort by custom meta value doesn’t work in WooCommerce products sort by
I’m trying to add a sorting option for woocommerce products’s list. The goal is to sort products by a meta value with meta key called _rating. For now I generate this meta value with a function …
WP_Query issue when trying to get out of stock products in WooCommerce
I’m using shortcode to display all sold out WooCommerce items on a WordPress page. It works fine, except for throwing an error: I figure that this means array_filter() expects an array, but is given null from the following code in my functions.php: Shortcode: [out_of_stock_products] Here’s the WooCommerce function that expects the array but is given null: I’m not sure how
Get WooCommerce specific product attribute terms sorted by “menu order”
I want to sort get_the_terms by menu_order of the curent product and till now i have this code: Answer There is 2 ways to get the product attribute term names sorted by menu order (for a defined product): 1). Using wp_get_post_terms() function (WordPress way) The WordPress function get_the_terms() doesn’t allow to alter the WP_Term_Query… So instead you will use similar
Call to a member function get_items() on boolean in WooCommerce thankyou
I am trying to get order details to display a summary on my thank you page. The issue I am having is that this code snippet I have is breaking my wordpress. I have the stacktrace but I am unsure on how to fix it. The code to me looks correct so ensure why it’s not working. Does anybody have
Disable shipping methods having a specific word and based on a shipping class in WooCommerce
I’ve used a Business Bloomer snippet and tweaked it a bit to unset some shipping methods depending on a shipping class of items in the cart. It works fine with the 4 shipping methods I have tested with but in order to fully work on my website, I have to list all shipping methods values manually and I have A
WooCommerce: get and echo “Order Total” on checkout page
I am trying to get the “Order Total” in a function with this code. But not working. The total is not printed at all. What am I missing here? add_action(‘…