Back to Documentation

Customizing With Hooks

FoxyShop allows developers to hook their own functions into the plugin to enable easier implementation of your desired customizations. Here is a list of some of the available hooks and filters with descriptions:

Action Hooks

  • foxyshop_save_product: Hook into the product saving process.
  • foxyshop_order_search_buttons: Add more buttons to the order management page to integrate your own reports
  • foxyshop_order_line_item: Add more links to the end of each order line to integrate your own actions
  • foxyshop_show_user_profile_data: Add more custom fields to the user profile (only for admin viewing)
  • foxyshop_admin_product_details: Add your own options to the product details metabox in the admin. Sample Code
  • foxyshop_datafeed_transaction_detail: Do something in the datafeed, transaction level
  • foxyshop_datafeed_order: Do something in the datafeed, order level
  • foxyshop_after_subscription_modify: Do something after modifying a subscription
  • foxyshop_after_transaction_archive: Do something after transactions are archived or unarchived.
  • foxyshop_order_search_list: Add entries to the search type dropdown menu on the order page

Filter Hooks

  • foxyshop_save_sso_to_foxycart: Lets you hook your own function in to add your own metadata to update the FoxyCart user. This could be address, phone number, etc. Sample Code Here.
  • foxyshop_setup_product_info: Lets you add your own keys into the $product array every time it is built. Sample Code Here.
  • foxyshop_template_redirect: Lets you modify the FoxyShop template being returned. Sample Code Here.
  • foxyshop_form_attributes – add an attribute like “target” to the form tag
  • foxyshop_form_l18n – modify the international currency settings that JavaScript uses
  • foxyshop_currency – change the currency output
  • foxyshop_product_url_slug – changes product url slug. Sample
  • foxyshop_shipname_to – Multiship: replaces “Ship this item to”
  • foxyshop_recipient_name – Multiship: replaces “Recipient Name”
  • foxyshop_quantity_title – Replaces Label: “Quantity” Sample
  • foxyshop_slideshow_before – Insert something before the image slideshow
  • foxyshop_slideshow_after – Insert something before the image slideshow
  • foxyshop_category_children_query – modify the Category Children query ($args array)
  • foxyshop_category_children_write – change what the category function returns (customize the html) Sample
  • foxyshop_after_category_display – insert something after category display (clearing div by default)
  • foxyshop_descriptionfield_variation – change the output of the variation description field
  • foxyshop_breadcrumb_nofloat – get rid of the nofloat div in li in the breadcrumb list
  • foxyshop_featured_category_simple – customize HTML returned when writing featured categories
  • foxyshop_featured_category_html – customize HTML returned when writing featured categories
  • foxyshop_related_products_thumbnail_size – default is “thumbnail”, change to something else
  • foxyshop_related_products_html – customize HTML returned for related products
  • foxyshop_variation_price_change – customize the price variation output (sample)
  • foxyshop_sort_default – dropdown titles
  • foxyshop_sort_price_low – dropdown titles
  • foxyshop_sort_price_high – dropdown titles
  • foxyshop_sort_newer_first – dropdown titles
  • foxyshop_sort_older_first – dropdown titles
  • foxyshop_template_transaction_product_array – change the subscription product going in to the transaction template for changing subscription types
  • foxyshop_template_transaction_xml – change the transaction template modification xml before it is submitted
  • foxyshop_jquery_url – switch to a different CDN for the jQuery include
  • foxyshop_order_ip – change the IP lookup provider on order management interface
  • foxyshop_store_includes_get – filters the XML sent to FoxyCart to get store includes
  • foxyshop_inventory_alert_email – sets the email address for the inventory alert (sample)
  • foxyshop_main_menu_name – change the main menu name for the plugin (sample)
  • foxyshop_transaction_filter_defaults – change the transaction search defaults
  • foxyshop_customer_filter_defaults – change the customer search defaults
  • foxyshop_subscription_filter_defaults – change the subscription search defaults
  • foxyshop_breadcrumbs_base_link – change the base url for the first breadcrumbs link (sample)
  • foxyshop_register_post_type – change the register post type argument array

UPS WorldShip Integration Hooks

  • foxyshop_ups_phone – remove or format the phone number exported to WorldShip
  • foxyshop_ups_postal_code – format the Postal Code exported to WorldShip
  • foxyshop_ups_goods_descript – remove or format the description of goods exported to WorldShip
  • foxyshop_ups_billing_option – change the BillingOption return
  • foxyshop_ups_shipment_info_node – add something to the XML for the ShipmentInformation node
  • foxyshop_ups_package_type – format packaging type
  • foxyshop_ups_package_node – add something to the XML for the Package node

Permission Hooks

These filters are helpful if you would like to allow for role-based setup and let a certain class of users access a certain feature. The Capabilities Manager plugin may be helpful here. Code sample here.

  • foxyshop_order_perm – default is admin role
  • foxyshop_subscription_perm – default is admin role
  • foxyshop_customer_perm – default is admin role
  • foxyshop_inventory_perm – default is admin role
  • foxyshop_google_product_perm – default is admin role
  • foxyshop_stats_perm – default is admin role
  • foxyshop_settings_perm – default is admin role
  • foxyshop_tools_perm – default is admin role
  • foxyshop_dashboard_stats_perm – default is admin role
  • foxyshop_category_sort_perm – default is editor role
  • foxyshop_product_sort_perm – default is editor role

If you have a particular need or a place where a hook would be really helpful for you, as a developer, please contact me and I will consider adding to the plugin core. My goal is to make FoxyShop very easy for you to customize.

Back to Documentation