Skip to content

Commit

Permalink
Merge pull request woocommerce#18700 from woocommerce/update/18687
Browse files Browse the repository at this point in the history
Before getting wc_get_loop_prop, setup the loop.
  • Loading branch information
claudiulodro committed Jan 31, 2018
2 parents c7c4ec9 + 0f33d44 commit 2936daa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/wc-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ function wc_reset_loop() {
* @return mixed
*/
function wc_get_loop_prop( $prop, $default = '' ) {
wc_setup_loop(); // Ensure shop loop is setup.

return isset( $GLOBALS['woocommerce_loop'], $GLOBALS['woocommerce_loop'][ $prop ] ) ? $GLOBALS['woocommerce_loop'][ $prop ] : $default;
}

Expand Down

0 comments on commit 2936daa

Please sign in to comment.