WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

WC_Object_Data_Store_Interface() WC 1.0

WC Data Store Interface

Хуков нет.

Возвращает

Null. Ничего.

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

$WC_Object_Data_Store_Interface = new WC_Object_Data_Store_Interface();
// use class methods

Методы

  1. create( &$data )
  2. read( &$data )
  3. update( &$data )
  4. delete( &$data, $args = array() )
  5. read_meta( &$data )
  6. delete_meta( &$data, $meta )
  7. add_meta( &$data, $meta )
  8. update_meta( &$data, $meta )

Код WC Object Data Store Interface: woocommerce/includes/interfaces/class-wc-object-data-store-interface.php WC 4.3.1

<?php
interface WC_Object_Data_Store_Interface {
	/**
	 * Method to create a new record of a WC_Data based object.
	 *
	 * @param WC_Data $data Data object.
	 */
	public function create( &$data );

	/**
	 * Method to read a record. Creates a new WC_Data based object.
	 *
	 * @param WC_Data $data Data object.
	 */
	public function read( &$data );

	/**
	 * Updates a record in the database.
	 *
	 * @param WC_Data $data Data object.
	 */
	public function update( &$data );

	/**
	 * Deletes a record from the database.
	 *
	 * @param  WC_Data $data Data object.
	 * @param  array   $args Array of args to pass to the delete method.
	 * @return bool result
	 */
	public function delete( &$data, $args = array() );

	/**
	 * Returns an array of meta for an object.
	 *
	 * @param  WC_Data $data Data object.
	 * @return array
	 */
	public function read_meta( &$data );

	/**
	 * Deletes meta based on meta ID.
	 *
	 * @param  WC_Data $data Data object.
	 * @param  object  $meta Meta object (containing at least ->id).
	 * @return array
	 */
	public function delete_meta( &$data, $meta );

	/**
	 * Add new piece of meta.
	 *
	 * @param  WC_Data $data Data object.
	 * @param  object  $meta Meta object (containing ->key and ->value).
	 * @return int meta ID
	 */
	public function add_meta( &$data, $meta );

	/**
	 * Update meta.
	 *
	 * @param  WC_Data $data Data object.
	 * @param  object  $meta Meta object (containing ->id, ->key and ->value).
	 */
	public function update_meta( &$data, $meta );
}