Support » Plugins » [Plugin: Woocommerce] Hook numbers

  • Resolved Colin Young


    In the woocommerce hooks file I see lots of numbers mentioned after the add_action line, for example:

    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );

    with the above example there are 3 numbers: 10 (woocommerce_output_product_data_tabs), 15 (woocommerce_upsell_display) and 20 (woocommerce_output_related_products)

    I thought if I only wanted to use one add_action I could include the number at the end of the do_action statement in my web page. For example:

    do_action( 'woocommerce_after_single_product_summary', 10 );

    The reason for this is because I want to split the woocommerce_after_single_product_summary to before and after some other content, like having 10, then some other content, then 20.

    Is this possible? I tried it and it didn’t make any difference

Viewing 1 replies (of 1 total)
  • It’s ok, I’ve got it.

    Instead of calling the hook I just called the function related to the part of the hook I wanted

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Woocommerce] Hook numbers’ is closed to new replies.