WC_Data::delete( bool $force_delete = false )

Delete an object, set the ID to 0, and return result.


Description Description


Parameters Parameters

$force_delete

(Optional) Should the date be deleted permanently.

Default value: false


Top ↑

Return Return

(bool) result


Top ↑

Source Source

File: includes/abstracts/abstract-wc-data.php

	public function delete( $force_delete = false ) {
		if ( $this->data_store ) {
			$this->data_store->delete( $this, array( 'force_delete' => $force_delete ) );
			$this->set_id( 0 );
			return true;
		}
		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.