woocommerce_store_api_register_update_callback()WC 1.0

Add callback functions that can be executed by the cart/extensions endpoint.

No Hooks.

Return

null. Nothing (null).

Usage

woocommerce_store_api_register_update_callback( $args );
$args(array) (required)
Args to pass to register_update_callback.

Notes

  • See: Automattic\WooCommerce\StoreApi\Schemas[ExtendSchema::register_update_callback()](/plugin/woocommerce/function/ExtendSchema::register_update_callback)

woocommerce_store_api_register_update_callback() code WC 8.7.0

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;
}