Automattic\WooCommerce\Admin\Features\ProductBlockEditor
BlockRegistry::augment_uses_context
Augment the uses_context of a block by adding attributes that are used by the product editor.
Method of the class: BlockRegistry{}
No Hooks.
Returns
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->augment_uses_context( $uses_context );
- $uses_context(array) (required)
- Block uses_context.
BlockRegistry::augment_uses_context() BlockRegistry::augment uses context code WC 9.9.5
private function augment_uses_context( $uses_context ) { // Note: If you modify this function, also update the client-side // registerProductEditorBlockType function in @woocommerce/product-editor. return array_merge( isset( $uses_context ) ? $uses_context : array(), array( 'postType', ) ); }