woocommerce_product_backorders_allowed
Returns whether or not the product can be backordered.
Usage
add_filter( 'woocommerce_product_backorders_allowed', 'wp_kama_woocommerce_product_backorders_allowed_filter', 10, 3 ); /** * Function for `woocommerce_product_backorders_allowed` filter-hook. * * @param $condition * @param $id * @param $that * * @return */ function wp_kama_woocommerce_product_backorders_allowed_filter( $condition, $id, $that ){ // filter... return $condition; }
- $condition
- -
- $id
- -
- $that
- -
Where the hook is called
woocommerce_product_backorders_allowed
woocommerce/includes/abstracts/abstract-wc-product.php 1758
return apply_filters( 'woocommerce_product_backorders_allowed', ( 'yes' === $this->get_backorders() || 'notify' === $this->get_backorders() ), $this->get_id(), $this );