Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jimmylet

    (@jimmylet)

    I’m progressing with my tests…

    The import works when using hooks like add_action, but on condition that the files are root files.

    For example: single-product.php

    But it won’t work if you call a hook of an element that is imported into single-product.php.

    Using the action “woocommerce_after_main_content” that is in single-product.php, it works.

    Using “woocommerce_after_cart_button” that is not present in single-product.php (but is imported through various hooks), it won’t work.

    What should I do to fix this problem?

    Thread Starter jimmylet

    (@jimmylet)

    I noticed that when I import shortcode directly into the php file view (e.g. single-product.php), then it works.

    The problem comes when I care about it thanks to a hook, as in my example

Viewing 2 replies - 1 through 2 (of 2 total)