miniCal
  • Quick Start
    • Introduction
  • miniCal Configuration
    • miniCal Hosted Service
    • Configure Feature Settings
    • Install Extensions
    • Create Multiple Properties
  • Local Installation
    • Local Installation
    • ENV Set-Up
    • Configuration Settings
    • Common Installations Errors
  • Contribution
    • Contribute to miniCal Core
  • Build an Extension
    • Build Your First Extension
      • Controllers
      • Assets
      • Config
      • language
      • Models
      • View
      • Helper
      • Library
      • Hooks
    • Open-source Extensions
    • Config Folder Files
      • Autoload File
      • Config File
      • Route File
    • miniCal Filters
    • miniCal Actions
    • Create Custom Hooks
    • Store Custom Data
      • POSTS
      • POSTMETA
      • OPTIONS
    • Composer Dependencies
  • Marketplace
    • miniCal Marketplace
  • Other resources
    • Overbooking for OTAs
    • miniCal Cron Setup
    • Automated Night Audit
    • Nginx Configuration
    • Docker Installation
    • Custom Domain Setup
  • Minical API Docs
    • API Documentation
  • Coming soon!
    • Access minical Data Using Helpers
      • Company Helper Functions
      • Customer Helper Functions
      • Booking Helper Functions
      • Rates Helper Functions
      • Rate Plan Helper Functions
      • Availability Helper Functions
      • Statement Helper Functions
      • Tax Helper Functions
      • Room Helper Functions
      • Charge Helper Functions
      • Payment Helper Functions
    • Access data in Extension
Powered by GitBook
On this page
  1. Build an Extension

miniCal Filters

List of supported Actions/Filters Hooks

Filters are functions that always accept data in the form of an Argument and, after processing again, return the data as Return Value. The filter itself means the process of filtering something out. Just like the do_action, here we have the apply_filters() function.

$filtered_value = apply_filters('example_filter_to_run', $arg );

So, now the $filtered_value will be the system-generated output until you add a filter on it. In order, add the filter you need to call add_filter() just like the add_action(). Below is the example :

// The filter callback function is based on the filter.

add_filter( ‘example_filter_to_run’, ‘example_callback_fun’, 10, 1 );

function example_callback_fun($arg) {
// code
return $arg;
}

Customer Filters List

METHOD
NAME
PARAMETERS
USE CASE

apply_filters

post.add.customer

$data

After the creation of new customer

apply_filters

post.update.customer

$data

After updating a customer

Payment Source Filters List

METHOD
NAME
PARAMETERS
USE CASE

apply_filters

post.create.payment_source

$data

After the creation of customer's new payment source

apply_filters

post.update.payment_source

$data

After updating a customer's payment source

apply_filters

post.delete.payment_source

$data

After deleting a customer's payment source

PreviousRoute FileNextminiCal Actions

Last updated 3 years ago