__( '3D Scan & Show', '3d-scan-and-show' ), ), ), $categories ); } public function register_block() { if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) { wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' ); } else { if ( function_exists( 'wp_register_block_metadata_collection' ) ) { wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' ); } $manifest_data = require __DIR__ . '/build/blocks-manifest.php'; foreach ( array_keys( $manifest_data ) as $block_type ) { register_block_type( __DIR__ . "/build/{$block_type}" ); } } } public function check_woocommerce() { $screen = get_current_screen(); if ( ! $screen || strpos( $screen->id, '3d-scan-and-show' ) === false ) { return; } if ( ! class_exists( 'WooCommerce' ) ) { ?>
' . esc_html__( 'View file not found:', '3d-scan-and-show' ) . ' ' . esc_html( $template_name ) . '