From which hook is data accessible

  • Unknown's avatar

    Hy I have an issue right now which raises a general question as well:

    So I want to use the function is_product_category() to determine if the page I am now on, is product cateory page, because in that case I want to do something, what I wont to do, lets say on a blog page or on a product page. But it returns always false (even if I am on a product category page), if I call it early, in an early hook, let`s say in ‘woocommerce_loaded’.

    So now I want to find out, that which is the first hook or first stage, from which I can use this function is_product_category(). But I have the same issue with every other such function like is_term, is_category, is_shop
    Furthermore here is this class WP_Post or any of these classes/data: https://codex.wordpress.org/Global_Variables , how can I find out, from which hook are they accessible/instantiated, if I want to use them?

    So besides the function is_product_category(), I would like to be able to find out from which point can any function/object/any sort of data used/accesses (or from which stage is loaded).

    Thanks you for your answers.

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    It sounds like you are needing help with the WooCommerce plugin, but have landed on the support forum for WordPress.com sites instead.

    We don’t offer WooCommerce on WordPress.com (unless you are upgraded to our WordPress.com Pro Plan) so we’re not your best point of contact, but the good news is that help is available by contacting WooCommerce staff here:

    https://wordpress.org/support/plugin/woocommerce

    The folks over there are familiar with your plugin and in the best position to assist. Hope this helps point you in the right direction!

  • The topic ‘From which hook is data accessible’ is closed to new replies.