wc_before_products_ending_sales

wc_before_products_ending_sales

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('wc_before_products_ending_sales') is found 1 times:

  • /includes/wc-product-functions.php line 511
     
    	// Sales which are due to end.
    	$product_ids = $data_store->get_ending_sales();
    	if ( $product_ids ) {
    		do_action( 'wc_before_products_ending_sales', $product_ids );
    		foreach ( $product_ids as $product_id ) {
    			$product = wc_get_product( $product_id );
    
    			if ( $product ) {
    				$regular_price = $product->get_regular_price();
    				$product->set_price( $regular_price );