woocommerce_store_api_register_update_callback()
Add callback functions that can be executed by the cart/extensions endpoint.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
woocommerce_store_api_register_update_callback( $args );
- $args(массив) (обязательный)
- Args to pass to register_update_callback.
Заметки
- Смотрите: Automattic\WooCommerce\StoreApi\Schemas[ExtendSchema::register_update_callback()](/plugin/woocommerce/function/ExtendSchema::register_update_callback)
Код woocommerce_store_api_register_update_callback() woocommerce store api register update callback WC 10.8.1
function woocommerce_store_api_register_update_callback( $args ) {
try {
$extend = StoreApi::container()->get( ExtendSchema::class );
$extend->register_update_callback( $args );
} catch ( \Exception $error ) {
return new \WP_Error( 'error', $error->getMessage() );
}
return true;
}