Elementor 开发者文档

title: "Register WooCommerce Features" post_status: publish comment_status: open taxonomy: category: - elementor-developers-docs post_tag: - Hello Elementor Theme - Src - Repos


Register WooCommerce Features

The theme registers various WooCommerce theme features. Developers can override this using a filter hook in a child-theme.

Hook Details

The hook controls whether the theme should register various WooCommerce features. By default it's set to true, however developers can prevent the theme from registering various WooCommerce features.

Usage

To prevent the theme from registering WooCommerce features, use the following hook in a child-theme functions.php file:

add_filter( 'hello_elementor_add_woocommerce_support', '__return_false' );

To register various WooCommerce theme features, use the WordPress native add_theme_support() function as follows:

add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );