The hooks you'll actually use.
The WordPress and WooCommerce actions and filters that come up in almost every snippet, explained in plain words: when each one fires, what it passes you, and a working example. Checked against the source.
WordPress
-
initAction Fires once WordPress has loaded and the current user is known, before any headers are sent. The usual place to register post types. -
wp_headAction Fires inside the <head> of every front-end page. Use it to print meta tags, link tags or small inline scripts and styles. -
wp_footerAction Fires just before the closing </body> tag on front-end pages. Use it to print HTML or inline scripts at the end of the page. -
wp_body_openAction Fires right after the opening <body> tag on front-end pages. Handy for skip links, notice bars and <noscript> fallbacks. -
wp_enqueue_scriptsAction The right hook for loading stylesheets and scripts on the front end with wp_enqueue_style() and wp_enqueue_script(). -
admin_enqueue_scriptsAction Loads stylesheets and scripts in the WordPress admin. Its $hook_suffix parameter tells you which admin screen is loading. -
after_setup_themeAction Fires after the active theme's functions.php has loaded. Use it to add theme support, image sizes and menu locations. -
template_redirectAction Fires on the front end once WordPress knows what's being viewed, before a template loads. Ideal for redirects and access checks. -
pre_get_postsAction Lets you change a query's settings before it runs, such as posts per page, post types or order, without writing a new query. -
the_contentFilter Filters a post's content before it's shown. Use it to add or change text before or after the post body. -
the_titleFilter Filters a post's title wherever get_the_title() is used, including menus and admin lists, so check the context first. -
excerpt_lengthFilter Sets how many words WordPress keeps when it creates an automatic excerpt from a post's content. The default is 55. -
excerpt_moreFilter Changes the text added to the end of a shortened automatic excerpt. By default it's ' […]'. -
body_classFilter Filters the list of CSS classes on the <body> tag, so you can target specific pages from your stylesheet. -
login_enqueue_scriptsAction Loads styles and scripts on the WordPress login page. The usual way to put your own logo on wp-login.php. -
admin_menuAction Fires before the admin menu is displayed. Use it to add your own admin pages or remove menu items. -
admin_noticesAction Prints notices at the top of admin screens. Use it for reminders, warnings or confirmation messages in the dashboard. -
save_postAction Fires after a post of any type is created or updated. Use it to save extra data or clear caches when content changes. -
upload_mimesFilter Filters which file types users can upload to the Media Library. Add an extension or remove one you don't want. -
rest_api_initAction Fires when the REST API is being set up. Register your own REST routes and fields here with register_rest_route(). -
wp_nav_menu_itemsFilter Filters the list items of a classic menu printed by wp_nav_menu(). Use it to add a link, such as Log in or Log out. -
document_title_partsFilter Filters the pieces WordPress joins to make the page's <title>: the title, page number, tagline and site name.
WooCommerce
-
woocommerce_before_add_to_cart_buttonAction Fires inside the add to cart form on single product pages, before the quantity box and button. Good for notes or extra fields. -
woocommerce_after_add_to_cart_buttonAction Fires right after the Add to cart button on single product pages, still inside the form. Use it for links or short notes. -
woocommerce_before_checkout_formAction Fires at the top of the classic checkout page, before the checkout form. It doesn't fire with the Checkout block. -
woocommerce_thankyouAction Fires on the order received (thank you) page after an order is placed, with the order ID. Use it for order-specific content. -
woocommerce_product_single_add_to_cart_textFilter Filters the Add to cart button text on single product pages. Return your own label, per product if you like. -
woocommerce_package_ratesFilter Filters the shipping rates offered for a package in the cart. Hide, rename or reprice shipping methods based on the basket. -
woocommerce_cart_calculate_feesAction Fires while cart totals are worked out, so you can add fees or surcharges to the cart with $cart->add_fee(). -
woocommerce_checkout_fieldsFilter Filters the fields of the classic checkout form: billing, shipping, account and order notes. Not used by the Checkout block. -
woocommerce_product_tabsFilter Filters the tabs on single product pages. Add your own tab, rename or reorder tabs, or remove Reviews. -
woocommerce_order_status_completedAction Fires when an order's status changes to Completed. Use it to run tasks once an order has been fulfilled.
No hook here matches. The editor in the plugin knows more than 2,500 hooks, with their parameters.
Move your snippets over this afternoon.
Importing changes nothing until you switch over, and your old shortcodes keep working.