WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
класс не описан

WC_Product_Variable_Data_Store_Interface{} WC 1.0

WC Product Variable Data Store Interface

Functions that must be defined by product variable store classes.

Хуков нет.

Возвращает

Null. Ничего.

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

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

Методы

  1. child_has_weight( $product )
  2. child_has_dimensions( $product )
  3. child_is_in_stock( $product )
  4. sync_variation_names( &$product, $previous_name = '', $new_name = '' )
  5. sync_managed_variation_stock_status( &$product )
  6. sync_price( &$product )
  7. delete_variations( $product_id, $force_delete = false )
  8. untrash_variations( $product_id )

Код WC_Product_Variable_Data_Store_Interface{} WC 4.6.0

<?php
interface WC_Product_Variable_Data_Store_Interface {
	/**
	 * Does a child have a weight set?
	 *
	 * @param WC_Product $product Product object.
	 * @return boolean
	 */
	public function child_has_weight( $product );

	/**
	 * Does a child have dimensions set?
	 *
	 * @param WC_Product $product Product object.
	 * @return boolean
	 */
	public function child_has_dimensions( $product );

	/**
	 * Is a child in stock?
	 *
	 * @param WC_Product $product Product object.
	 * @return boolean
	 */
	public function child_is_in_stock( $product );

	/**
	 * Syncs all variation names if the parent name is changed.
	 *
	 * @param WC_Product $product Product object.
	 * @param string     $previous_name Previous name.
	 * @param string     $new_name New name.
	 */
	public function sync_variation_names( &$product, $previous_name = '', $new_name = '' );

	/**
	 * Stock managed at the parent level - update children being managed by this product.
	 * This sync function syncs downwards (from parent to child) when the variable product is saved.
	 *
	 * @param WC_Product $product Product object.
	 */
	public function sync_managed_variation_stock_status( &$product );

	/**
	 * Sync variable product prices with children.
	 *
	 * @param WC_Product|int $product Product object or ID.
	 */
	public function sync_price( &$product );

	/**
	 * Delete variations of a product.
	 *
	 * @param int  $product_id Product ID.
	 * @param bool $force_delete False to trash.
	 */
	public function delete_variations( $product_id, $force_delete = false );

	/**
	 * Untrash variations.
	 *
	 * @param int $product_id Product ID.
	 */
	public function untrash_variations( $product_id );
}