woocommerce_downloadable_file_permission

woocommerce_downloadable_file_permission

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_downloadable_file_permission') is found 1 times:

  • /includes/wc-order-functions.php line 421
    		$from_date = $order->get_date_completed() ? $order->get_date_completed()->format( 'Y-m-d' ) : current_time( 'mysql', true );
    		$download->set_access_expires( strtotime( $from_date . ' + ' . $expiry . ' DAY' ) );
    	}
    
    	$download = apply_filters( 'woocommerce_downloadable_file_permission', $download, $product, $order, $qty, $item );
    
    	return $download->save();
    }
    
    /**
     * Order Status completed - give downloadable product access to customer.