i try to slightly modify with +1 check for plugin located here So , for all Virtual Downloadable Free (price=0,00) & on Backorder products I want Woocommerce to set order status ‘Processing’ the …
Tag: woocommerce
Get Stripe Customer ID on WordPress / WooCommerce
I’m building an e-commerce website which is linked to a mobile app. I would like to store the stripe customer id of a customer on WordPress after his purchase/subscription Is it possible? How? Answer This is possible by using the field : wp__stripe_customer_id
How to add a new field to my account details between other fields
With the snippet below we add a billing phone field to the account edit details. This works without problems, only we would have liked to add the new field between the email and the password change …
WooCommerce – get customer lifetime order cost adjusting for discounts AND refunds
I’m attempting to spit out the lifetime cost of a customers total (completed) orders. The value I’m getting back is equal to the amount if they were not discounted, however I’ve discounted all the …
Remove product after an order has been placed in WooCommerce
I’m using the most recent versions of WordPress and WooCommerce. I’m aware this might seem weird out of context, but I wanna add a hook to my functions.php that removes a certain product by ID from an order after the order has been placed. Here is what I am working with so far: I am trying to remove the product
How to set product brand when programatically importing WooCommerce product?
I am working on a script to import products from a plain text file that is provided to me by a 3rd party. I have successfuly imported the products by using WC_Product object, for instance: //new …
How to use WooCommerce Membership hook
I’m working on a website using WooCommerce membership. I’m using a hook called wc_memberships_user_membership_saved, What I want is to display a recap of my order. I read this documentation: https://docs.woocommerce.com/document/woocommerce-memberships-admin-hook-reference/#wc_memberships_user_membership_created on how to use this hook. I want to test this hook so this is what I did in my functions.php I should receive a boolean: true or false. But
WooCommerce: Display My Account link only for specific user role
I want to display the subscription link in the WooCommerce My Account navigation only to a specific user role. But I couldn’t figure out how to change the navigation in that way. I found a solution …
How to add id to button add to woocomerce cart
someone knows how I can add id to the woocommerce buttons, woocommerce adds this structure <button type="submit" data-quantity="1" data-product_id="id_del_producto" class="button alt …
WordPress: Get child taxonomies only from one level down
I want to display the WooCommerce sub-categories based on the current categorie ID. To get all sub-categories, I’m using the following code to get all child IDs. The problem is, that I get all …