Hi there,
the PHP Snippet provided in that topic has to be added using one of the methods provided here:
https://docs.generatepress.com/article/adding-php/
Explanation: when you see add_action
( or add_filter
) in a PHP snippet – well those are methods for adding something to a hook.
The Hook Element – is doing the same thing its just writing the add_action code along with any display conditions for you behind the scenes.
As hooks are executed in particular order ( firing sequence ) you can’t simply get one hook action to create another hook action.
Yes, the wonders of Woo … the bottom line here is Woo is complicated but very extensible. And they have to make money so they sell a lot of extensions that provide some features that could be built in. Or as is the WP way could be added to Themes and Plugins.