Hooks: Action & Filter reference

Actions

Template actions:

  • jigoshop_before_main_content and jigoshop_after_main_content - called in all templates to output the main wrapper.
  • jigoshop_pagination - called after the product loop.
  • jigoshop_before_single_product
  • jigoshop_before_shop_loop
  • jigoshop_before_shop_loop_item_title
  • jigoshop_before_single_product_summary
  • jigoshop_before_main_content - This is where breadcrumbs are shown.
  • jigoshop_sidebar
  • jigoshop_after_shop_loop_item
  • jigoshop_before_shop_loop_item_title
  • jigoshop_after_shop_loop_item_title
  • jigoshop_product_thumbnails
  • jigoshop_after_single_product_summary
  • jigoshop_template_single_summary - Summary box where pricing etc are shown.
  • jigoshop_product_tabs - Tabs on the product page.
  • jigoshop_product_tab_panels - Tab panels on the product page.
  • before_checkout_form
  • jigoshop_checkout_billing - called in templates/checkout/form.php in the billing column.
  • jigoshop_checkout_shipping - called in templates/checkout/form.php in the shipping column.

Order actions:

  • order_status_{new status} - called when an order’s status changes. Takes 1 argument - order ID
  • order_status_{old status}_to_{new status} - called when an order’s status changes. Takes 2 arguments - the status slug, and the order ID
  • jigoshop_product_on_backorder_notification - Called when a product goes into negative stock and is on backorder. Takes 2 arguments - item id and item quantity
  • jigoshop_no_stock_notification - Called when a product reaches the criteria for having no stock. Takes 1 argument - item id.
  • jigoshop_low_stock_notification - Called when a product reaches the criteria for having low stock. Takes 1 argument - item id.
  • jigoshop_new_order - Called when a new order is saved. Takes 1 argument - order id.

Payment actions:

  • receipt_{payment method} - called in pay.php by the shortcode jigoshop_pay. Allows a payment method to show a receipt or a payment button/iframe. Takes 1 argument - order ID
  • valid-paypal-standard-ipn-request and valid-skrill-status-report - Used in PayPal/Moneybookers when a valid IPN response is detected. Takes 1 argument - the post data.

Backend actions:

  • jigoshop_product_type_options_box - Allows product types to display their specific options in WordPress admin.
  • process_product_meta_{product type} - Called when saving a product in WordPress admin. Takes 2 arguments - data (array) and post id.
  • product_write_panel_tabs - Called on the edit product screen in WordPress admin, allowing other tabs to be added.
  • product_write_panels - Called on the edit product screen in WordPress admin, allowing other panels to be added.
  • product_type_selector - Lets product types insert themselves into the product types dropdown box on the edit product page. Takes 1 argument - product type.

Filters

  • loop-shop-query - used during the main product query letting you change the filters given to query_posts. see jigoshop_filter_loop()
  • loop-shop-posts-in - used during the main product query letting you filter the post ids which will be queried. see jigoshop_filter_loop()
  • widget_product_categories_args and widget_product_categories_dropdown_args - filters the $cat_args array allowing you to change product categories in the product categories widget.
  • widget_tag_cloud_args - filters the options array in the product tag cloud widget.
  • jigoshop_shipping_methods - filters the shipping methods. Shipping methods hook into this to make themselves available.
  • process_product_meta_{product type} - filters the data array after saving a product (based on product type). Takes 2 arguments - $data (array) and post id and returns $data.
  • jigoshop_payment_gateways -filters the payment methods. Payment methods hook into this to make themselves available.
  • shipping_to_prefix - filters the shipping prefix based on the passed country code.
  • jigoshop_get_var_{var name} - used in the jigoshop class, this filters a variable inside the get_var function before returning it.
  • widget_tag_cloud_args - filters the options array in the product tag cloud widget.