register( WC_SC_Blocks_Integration::get_instance() ); } } ); add_action( 'woocommerce_blocks_checkout_block_registration', function( $integration_registry ) { if ( is_object( $integration_registry ) && is_callable( array( $integration_registry, 'register' ) ) && class_exists( 'WC_SC_Blocks_Integration' ) ) { $integration_registry->register( WC_SC_Blocks_Integration::get_instance() ); } } ); } ); /** * Registers the slug as a block category with WordPress. * * @param array $categories List of existing categories. * @return array */ function register_woocommerce_smart_coupons_block_category( $categories ) { return array_merge( $categories, array( array( 'slug' => 'woocommerce-smart-coupons', 'title' => _x( 'WooCommerce Smart Coupons', 'Block editor', 'woocommerce-smart-coupons' ), ), ) ); } add_action( 'block_categories_all', 'register_woocommerce_smart_coupons_block_category', 10, 2 );