Our plugin is well-coded and follows the best-practices of WordPress. So we have implemented the configurator templates based on hooks and filters. On this page you will find all relevant hooks so you can hook into our plugin code and extend its features! The image below illustrates a visual representation of the product hooks.
All hooks are described in detail below. Note: a lot of hooks do not have any functions hooked yet. That is because we want to make the product configurator easily extendable. If you see ‘@hooked – ‘, that means no functions are hooked by default. Before single product Before product page: /** * Hook: staggs_before_single_product. * * @hooked - */ do_action( 'staggs_before_single_product' ); Before product content (within the #product div): /** * Hook: staggs_before_single_product_content. * * @hooked staggs_output_content_wrapper - 90 */ do_action( 'staggs_before_single_product_content' ); Product Gallery /** * Hook: staggs_before_single_product_gallery. * * @hooked staggs_output_company_logo - 10 */ do_action( 'staggs_before_single_product_gallery' ); /** * Hook: staggs_single_product_gallery. * * @hooked staggs_output_preview_gallery - 10 * @hooked staggs_output_preview_gallery_nav - 20 */ do_action( 'staggs_single_product_gallery' ); /** * Hook: staggs_after_single_product_gallery. * * @hooked - */ do_action( 'staggs_after_single_product_gallery' ); Product Options /** * Hook: staggs_before_single_product_options. * * @hooked staggs_output_options_wrapper - 10 */ do_action( 'staggs_before_single_product_options' ); /** * Hook: staggs_single_product_summary. * * @hooked woocommerce_template_single_title - 5 * @hooked woocommerce_template_single_rating - 10 * @hooked woocommerce_template_single_price - 20 * @hooked woocommerce_template_single_excerpt - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 */ do_action( 'staggs_single_product_summary' ); The ‘staggs_single_product_summary’ hook is a dynamic hook. By default we have included most WooCommerce template functions. However, we do allow the user to disable price and meta display. And some hooks will be disabled based on ‘classic’ or ‘classic title top’ layouts. So not all functions may be hooked. /** * Hook: staggs_after_single_product_options. * * @hooked staggs_output_options_wrapper_close - 20 */ do_action( 'staggs_after_single_product_options' ); Product Option Group /** * Hook: staggs_before_single_option_group. * * @hooked - */ do_action( 'staggs_before_single_option_group' ); /** * Hook: staggs_single_option_group. * * @hooked staggs_output_option_group_header - 10 * @hooked staggs_output_option_group_content - 20 * @hooked staggs_output_option_group_summary - 30 */ do_action( 'staggs_single_option_group' ); /** * Hook: staggs_after_single_option_group. * * @hooked staggs_option_group_description_panel - 10 */ do_action( 'staggs_after_single_option_group' ); Product Totals /** * Hook: staggs_before_single_product_options_totals * * @hooked - */ do_action( 'staggs_before_single_product_options_totals' ); /** * Hook: staggs_single_product_options_totals * * @hooked staggs_output_options_cart_button - 10 * @hooked staggs_output_options_usps - 20 * @hooked staggs_output_options_credit - 30 */ do_action( 'staggs_single_product_options_totals' ); After single product /** * Hook: staggs_after_single_product_content. * * @hooked staggs_output_content_wrapper_close - 10 */ do_action( 'staggs_after_single_product_content' ); /** * Hook: staggs_after_single_product. * * @hooked - */ do_action( 'staggs_after_single_product' );