VAT
Your cart

Your cart is empty.

Multisite hooks

This page lists the 3 hooks of this group. Each entry shows its type, the version it arrived in, where it runs, its arguments and a starting point.

adba_network_index_row

FilterSince 2.2.0 Runs in src/Network/Indexer.php.

Filters a row of the network index before it is written (multisite).

Return null to keep the object out of the index. Columns: number, title, status, total, currency, date_created (GMT, Y-m-d H:i:s), email, subtype, stock, stock_qty, image, customer_id.

ArgumentTypeDescription
$rowarray<string, mixed>|nullRow, null when Addofy does not index this object.
$objectobject|nullThe order or product, null for a type of your own.
$typestringType.
$idintObject id.
add_filter( 'adba_network_index_row', function ( $row, $object, $type, $id ) {
	return $row;
}, 10, 4 );

adba_network_index_types

FilterSince 2.2.0 Runs in src/Network/Indexer.php.

Filters the object types kept in the network index (multisite).

Built in: order and product. Remove one to stop indexing it. For a type of your own, queue objects with \AddoBack\Network\Indexer::queue( $type, $id ) and build their row in adba_network_index_row (the object is null then).

ArgumentTypeDescription
$typesstring[]Type names.
add_filter( 'adba_network_index_types', function ( $types ) {
	return $types;
} );

adba_network_list_columns

FilterSince 2.2.0 Runs in src/Modules/NetworkLists/NetworkTable.php.

Filters the columns of the network overview lists (All orders, All products).

Fill a column of your own through the column_{name} method of a subclass, or keep to the index columns.

ArgumentTypeDescription
$columnsarray<string, string>Column id => label.
$typestringorder or product.
add_filter( 'adba_network_list_columns', function ( $columns, $type ) {
	return $columns;
}, 10, 2 );

Ready to connect your AI to real tools?

Start free trial