Warning: This method has been deprecated.

WC_Abstract_Legacy_Product::get_categories( string $sep = ', ', string $before = '', string $after = '' )

Returns the product categories.


Description Description


Parameters Parameters

$sep

(Optional) (default: ', ').

Default value: ', '

$before

(Optional) (default: '').

Default value: ''

$after

(Optional) (default: '').

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/legacy/abstract-wc-legacy-product.php

	public function get_categories( $sep = ', ', $before = '', $after = '' ) {
		wc_deprecated_function( 'WC_Product::get_categories', '3.0', 'wc_get_product_category_list' );
		return wc_get_product_category_list( $this->get_id(), $sep, $before, $after );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.