wc_set_loop_prop( string $prop, string $value = '' )

Sets a property in the woocommerce_loop global.


Description Description


Parameters Parameters

$prop

(Required) Prop to set.

$value

(Optional) Value to set.

Default value: ''


Top ↑

Source Source

File: includes/wc-template-functions.php

function wc_set_loop_prop( $prop, $value = '' ) {
	if ( ! isset( $GLOBALS['woocommerce_loop'] ) ) {
		wc_setup_loop();
	}
	$GLOBALS['woocommerce_loop'][ $prop ] = $value;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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