Packaging Fit
StartIntegrationsDevelopmentTranslationTroubleshooting
  • Getting Started
    • Installation
    • Configuration
  • Integrations
    • WooCommerce
  • Development
    • Actions
    • Filters
  • Translation
  • Troubleshooting
  • Conclusion
Powered by GitBook
On this page
  • twpf_before_register_settings
  • twpf_after_register_settings
  • twpf_before_package_data
  • twpf_after_package_data

Was this helpful?

  1. Development

Actions

Packaging Fit provides several action hooks that allow developers to extend and customize its functionality.

twpf_before_register_settings

Triggered before the plugin settings are registered. Use this action to add additional settings or modify existing ones.

add_action( 'twpf_before_register_settings', 'twpf_custom_settings_function' );
function twpf_custom_settings_function() {
    // Add custom settings logic here
}

twpf_after_register_settings

Triggered after the plugin settings are registered. Useful for performing actions after all settings are set up.

add_action( 'twpf_after_register_settings', 'twpf_custom_after_settings_function' );
function twpf_custom_after_settings_function() {
    // Perform actions after settings are registered
}

twpf_before_package_data

Triggered before the package data is output. Use this action to modify or add data to the package configuration.

add_action( 'twpf_before_package_data', 'twpf_custom_before_package_data_function' );
function twpf_custom_before_package_data_function() {
    // Modify package data before output
}

twpf_after_package_data

Triggered after the package data is output. Use this action to add additional HTML or scripts related to package data.

add_action( 'twpf_after_package_data', 'twpf_custom_after_package_data_function' );
function twpf_custom_after_package_data_function() {
    // Add custom HTML or scripts after package data
}
PreviousDevelopmentNextFilters

Last updated 9 months ago

Was this helpful?