For the complete documentation index, see llms.txt. This page is also available as Markdown.

Company Helper Functions

The helper you can use to get company details and settings for the company.

function get_company($company_id) {....}

Supported hooks

Filter name: before_get_company Description: This filter would be executed before retrieving company details from database in get_company helper. Usage:

// The filter callback function is based on the filter.
add_filter('before_get_company', 'before_get_company_callback_fn', 10, 1);
 
function before_get_company_callback_fn ($company_id) {
   // This filter would be executed before retrieving company details from database in get_company helper.
}

Filter name: should_get_company Description: This filter would be executed before retrieving company details from database in get_company helper. Usage:

// The filter callback function is based on the filter.
add_filter('should_get_company', 'should_get_company_callback_fn', 10, 1);

function should_get_company_callback_fn ($company_id) {
   // This filter would be executed before retrieving company details from database in get_company helper.
}

Hook name : pre.get.company Description: This hook would be executed before retrieving company details from database in get_company helper. Usage:

// The filter callback function is based on the filter.
add_filter('pre.get.company', 'pre_get_company_callback_fn', 10, 1);

function pre_get_company_callback_fn ($company_id) {
   // This filter would be executed before retrieving comapny from database in get_company helper.
}

Hook name : post.get.company Description: This hook would be executed after retrieving company details from database in get_company helper. Usage:

Usage

Request Parameters

Param
Type
Required
Default
Description

$company_id

Integer

Yes

Null

Company Id is the primary key for the company table.

Response

function get_company_data($company_id) {....}

Supported hooks

Filter name: before_get_companies Description: This filter would be executed before retrieving company details from database in get_company_data helper. Usage:

Filter name: should_get_companies Description: This filter would be executed before retrieving company details from database in get_company_data helper. Usage:

Hook name : pre.get.companies Description: This hook would be executed before retrieving company details from database in get_company_data helper. Usage:

Hook name : post.get.companies Description: This hook would be executed after retrieving company details from database in get_company_data helper. Usage:

Usage

Request Parameters

Param
Type
Required
Default
Description

$company_id

Integer

Yes

Null

Company Id is the primary key for the company table.

Response

Last updated