add-to-cart-form-shortcode
add-to-cart-form-shortcode copied to clipboard
Detect current page query from inside the shortcode.
We are intentionally killing the current $wp_query
here but that means that we have no way to detect what page we're currently on when we are inside the shortcode... making any conditional logic (like is_checkout()
) impossible.