wc_set_hooked_blocks_version()
Set the version of the hooked blocks in the database. Used when WC is installed for the first time.
No Hooks.
Return
null
. Nothing (null).
Usage
wc_set_hooked_blocks_version();
Changelog
Since 9.2.0 | Introduced. |
wc_set_hooked_blocks_version() wc set hooked blocks version code WC 9.4.2
function wc_set_hooked_blocks_version() { // Only set the version if the current theme is a block theme. if ( ! wc_current_theme_is_fse_theme() && ! current_theme_supports( 'block-template-parts' ) ) { return; } $option_name = 'woocommerce_hooked_blocks_version'; if ( get_option( $option_name ) ) { return; } add_option( $option_name, WC()->version ); }