Automattic\WooCommerce\Internal\OrderReviews

ItemEligibility::initpublicWC 1.0

Register the default filter callbacks the OrderReviews feature ships with.

Auto-called by the WC dependency container after instantiation.

Method of the class: ItemEligibility{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ItemEligibility = new ItemEligibility();
$ItemEligibility->init(): void;

ItemEligibility::init() code WC 11.0.1

final public function init(): void {
	add_filter(
		'woocommerce_review_order_eligible_items',
		array( self::class, 'exclude_fully_refunded_items' ),
		10,
		2
	);

	// Surface the variation summary captured at submission time on the
	// single-product Reviews tab, so a review for "Size: Small" doesn't
	// render indistinguishably from one for "Size: Medium" on the parent
	// product page.
	add_action(
		'woocommerce_review_before_comment_text',
		array( self::class, 'render_variation_summary' )
	);
}