Title: Gutenberg Blocks Support
Last modified: April 28, 2021

---

# Gutenberg Blocks Support

 *  Resolved [descomputers](https://wordpress.org/support/users/descomputers/)
 * (@descomputers)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/gutenberg-blocks-support/)
 * Since support for Gutenberg blocks was added in 3.8.0 sites still using WP <5
   are now breaking as there is no register_block_type function.
 * Adding an if statement round the link in the __construct function in Blocks.php
   checking for the existence of this function would rectify this.
 *     ```
       public function __construct() {
       		add_filter( 'block_categories', [ $this, 'register_block_categories' ], 10, 2 );
       		add_action( 'init', [ $this, 'register_scripts' ] );
       		if ( function_exists( 'register_block_type' ) ) {
       			add_action( 'init', [ $this, 'register_blocks' ] );
       		}
   
       		add_action( 'wp_ajax_vczapi_get_zoom_hosts', [ $this, 'get_hosts' ] );
       		add_action( 'wp_ajax_vczapi_get_live_meetings', [ $this, 'get_live_meetings' ] );
       	}
       ```
   
 * Cheers
    Greg

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Deepen Bajracharya](https://wordpress.org/support/users/j_3rk/)
 * (@j_3rk)
 * [5 years ago](https://wordpress.org/support/topic/gutenberg-blocks-support/#post-14539663)
 * This has been added in latest version. Many thanks for the suggestion 🙂
 *  Thread Starter [descomputers](https://wordpress.org/support/users/descomputers/)
 * (@descomputers)
 * [5 years ago](https://wordpress.org/support/topic/gutenberg-blocks-support/#post-14540497)
 * Thanks Deepen 🙂 I noticed you included the register_scripts as well which I 
   hadn’t considered.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Gutenberg Blocks Support’ is closed to new replies.

 * ![](https://ps.w.org/video-conferencing-with-zoom-api/assets/icon-128x128.png?
   rev=3133950)
 * [Video Conferencing with Zoom](https://wordpress.org/plugins/video-conferencing-with-zoom-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/video-conferencing-with-zoom-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/video-conferencing-with-zoom-api/)
 * [Active Topics](https://wordpress.org/support/plugin/video-conferencing-with-zoom-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/video-conferencing-with-zoom-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/video-conferencing-with-zoom-api/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [descomputers](https://wordpress.org/support/users/descomputers/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/gutenberg-blocks-support/#post-14540497)
 * Status: resolved