You can use the code update_post_meta( get_the_ID(), '_stock_status',$value)
to change the value of the meta. Please place the above line in the code where you want to change the status value and remember $value is the variable/array/object you can place any string/array/object in it.
Related Posts:
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- change woocommerce product statut (draft ->publish // publish->draft) depends on the month [closed]
- I have 3 types of prices in WP and I need to change price for each specific user role using hooks
- Sort products by Sale price and stock status
- Update a list of product to featured if product have meta value (Mysql not wpquery)
- Bulk edit orders to ‘wc-processing’ status
- custom status in Woocommerce with database results
- Order by rating not works in wp_query
- Woocommerce checkout fields on the same line
- display available size on hover, in woocommerce shop page [closed]
- Hide income in Woocomercer [closed]
- WooCommerce: Email Notifications
- How do you add custom metadata to WooCommerce orders? Specifically a second external order ID
- WooCommerce: Adding Order Item Meta Data That’s Hidden
- Hide tabs on woocommerce product editor for user role
- Woocommerce add_to_cart non-register visitor not working
- Redirect user after login through woocommerce login page to page with his/her username?
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- How to show loading spinner after click on add to cart button [closed]
- Authenticate user into wordpress via 3rd party system, both with the same domain
- WordPress select field – show current value?
- Arranging Product Details on Shop Page
- How to get woocommerce subscription next payment date or date when subscription expires in woocommerce_subscription_renewal_payment_complete hook?
- WooCommerce product taxonomies and menu export
- Display Message if woocommerce coupon is not applicable to some items in the cart
- (Woocommerce) How to add a custom page between cart and checkout with a file upload field per product item in the cart?
- Force uppercase on some WooCommerce checkout fields input
- Display custom field without plugin in woocommerce
- How to output php between header and woocommerce container
- WooCommerce – How can I make single product gallery show two images on the slider at once?
- How to delete all customer user account that haven’t placed a single order?
- How do I hide ‘out of stock’ products in the admin ‘product’ page?
- Hide the prefix before the price of the product [closed]
- Backend users list – add Woocommerce meta to table
- Delete cookie when changing url (when navigating away from specific page of website)
- Add custom field to Woocommerce add new attribute / edit page
- woocommerce axios react
- Woocommerce hook on address field change [closed]
- Maintenance mode just for WooCommerce shop pages [closed]
- Custom email template for a specific product category
- update_post_meta not work [closed]
- Same request Mysql/Php not same result
- WooCommerce Registration redirect based on page ID
- Get woocommerce coupon code
- Woocommerce change price in cart when discounted
- Woocommerce Remove Tax by Product Type
- WooCommerce print subcategory of product
- Woocommerce – sell a certain category by unit, another by weight? How?
- Woocommerce Product permalinks “product” word is not working
- Add custom parameters to Woocommerce add to cart link
- How to automatically change the status of product from draft to published when stock qty change from 0 > 1
- Woocommerce checkout page issue – Payment methods not loading – strange “Credit/Debit Card Secure Payment” form
- Pagination in woocommerce – Limiting page-numbers
- Delete method giving 500 error, for this endpoint /wc/store/cart/items
- In woocommerce product details not showing
- Re-arrange the Woocommerce checkout page layout
- How to sort products by price ASC and place all no price products to the end? (Woocommerce)
- Change order of combined product tabs
- Display notice on WooCommerce emails depending on chosen shipping option
- Parameters in woocommerce_before_add_to_cart_button hook
- Check if product variation image is from the variation itself or from the parent
- WordPress Woocommerce Endpoint URL
- Will ‘private’ status prevent Woocommerce products to be indexed by search engines?
- How to use products shortcode in taxonomy-product_cat with multiple columns?
- Position WooCommerce basket and pricing
- Add to cart is not visible in product page
- Notice: Trying to get property of non-object in
- French accented text replaced with ? in woocommerce product list
- Trying to figure out why an error is returned when trying to add an item to the basket on this website
- Conditionnaly replace “Read more” text WooCommerce products
- WooCommerce/Authorize.net interface problem
- Using category and its sub-categories products attributes as filter in products pages
- How to make a custom redirect in WooCommerce?
- Firstname and lastname greyout or hidden Billing details at next checkout like username is hidden [closed]
- How to use woo commerce login to authenticate code php pages?
- Change order status after checkout
- Is it safe to update an old site after backing it up and activating a child theme?
- how to add custom reviews button in woocommerce order complete generated mail
- Click Count on Download a File
- How to add coupon expiry date into the followup emails?
- Disable Woocommerce main shop page, but not the product category archive pages
- Not all strings are translated
- Custom Woocommerce checkout filed yields a Json error when validating [closed]
- access Woo commerce | WordPress methods externally
- How to display Woocommerce catagories
- Woocommerce set single city to sell to
- Trying to link to a custom css file in a new folder
- eCommerce solution doesn’t want to display its shortcodes or any content where it’s set to [closed]
- Woocommerce hidden fields with meta keys and values. how?
- How do I make a diagonal strikethrough on wordpress? [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- Add woocommerce.css in template?
- How to dublicate WC Product title to shortdescription field? [closed]
- Translate Woocommerce tab
- Woocommerce -> gallery images per variation without a plugin? [closed]
- Why is my WordPress admin not working
- Create bookings after subscription renewal
- Change variants URL
- Use a woocommerce hook to create a table and populate it with a query
- Woocommerce product and category in url [closed]