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: ''
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; }
Changelog Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |