wc_set_loop_prop()
Sets a property in the woocommerce_loop global.
No Hooks.
Return
null
. Nothing (null).
Usage
wc_set_loop_prop( $prop, $value );
- $prop(string) (required)
- Prop to set.
- $value(string)
- Value to set.
Default: ''
Changelog
Since 3.3.0 | Introduced. |
wc_set_loop_prop() wc set loop prop code WC 8.7.0
function wc_set_loop_prop( $prop, $value = '' ) { if ( ! isset( $GLOBALS['woocommerce_loop'] ) ) { wc_setup_loop(); } $GLOBALS['woocommerce_loop'][ $prop ] = $value; }