This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Auto reduce WooCommerce order stock at checkout. | |
* Add to theme functions.php file | |
*/ | |
add_action( 'woocommerce_thankyou', 'woocommerce_reduce_order_stock' ); | |
function woocommerce_reduce_order_stock( $order_id ) { | |
global $woocommerce; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Order product collections by stock status, instock products first. | |
*/ | |
class iWC_Orderby_Stock_Status | |
{ | |
public function __construct() | |
{ |