Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Register::delete_by_idpublicWC 1.0

Delete the approved directory identitied by the supplied ID.

Метод класса: Register{}

Хуков нет.

Возвращает

true|false.

Использование

$Register = new Register();
$Register->delete_by_id( $id ): bool;
$id(int) (обязательный)
The ID of the rule to be deleted.

Код Register::delete_by_id() WC 10.4.3

public function delete_by_id( int $id ): bool {
	global $wpdb;

	if ( ! $wpdb->delete( $this->get_table(), array( 'url_id' => $id ) ) ) {
		return false;
	}

	unset( $this->cache );
	return true;
}