woocommerce_register_post_type

woocommerce_register_post_type

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_register_post_type') is found 1 times:

  • /includes/class-wc-post-types.php line 293
    		if ( ! is_blog_installed() || post_type_exists( 'product' ) ) {
    			return;
    		}
    
    		do_action( 'woocommerce_register_post_type' );
    
    		$permalinks = wc_get_permalink_structure();
    		$supports   = array( 'title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'publicize', 'wpcom-markdown' );
    
    		if ( 'yes' === get_option( 'woocommerce_enable_reviews', 'yes' ) ) {
    			$supports[] = 'comments';