woocommerce_store_api_register_update_callback()
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() woocommerce store api register update callback code WC 9.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; }