Listado de hooks de Import and Exports Users and Customers

Listado de hooks de Import and Exports Users and Customers
30 marzo, 2020

A continuación os dejamos un listado de los hooks: filter y actions, que ofrecemos en nuestro plugin para importar y exportar usuarios para WordPress y WooCommerce: Import and Export Users and Customers. El listado lo he generado manualmente con este proyecto que encontré en GitHub, muy recomendable si tenéis un plugin WordPress y queréis hacer una documentación rápida.

Hook: acui_restricted_fields

Description

File: import-users-from-csv-with-meta.php

Type: Filter

Parameter: $acui_restricted_fields

Declaration:

return apply_filters( 'acui_restricted_fields', $acui_restricted_fields );

Code exemple:

add_filter( 'acui_restricted_fields', 'prefix_acui_restricted_fields' );
function prefix_acui_restricted_fields( $acui_restricted_fields ) { 
	// Code
	return $acui_restricted_fields;
}

Hook: editable_roles

Description

File: import-users-from-csv-with-meta.php

Type: Filter

Parameter: $all_roles

Declaration:

$editable_roles = apply_filters('editable_roles', $all_roles);

Code exemple:

add_filter( 'editable_roles', 'prefix_editable_roles' );
function prefix_editable_roles( $all_roles ) { 
	// Code
	return $all_roles;
}

Hook: acui_tabs

Description

File: import-users-from-csv-with-meta.php

Type: Filter

Parameter: $tabs

Declaration:

$tabs = apply_filters( 'acui_tabs', $tabs );

Code exemple:

add_filter( 'acui_tabs', 'prefix_acui_tabs' );
function prefix_acui_tabs( $tabs ) { 
	// Code
	return $tabs;
}

Hook: wpaa_grant_access

Description

File: import-users-from-csv-with-meta.php

Type: Action

Parameters: $user, $capability

Declaration:

do_action( 'wpaa_grant_access' , $user , $capability );

Code exemple:

add_action( 'wpaa_grant_access', 'prefix_wpaa_grant_access', 10, 2 );
function prefix_wpaa_grant_access( $user, $capability ) { 
	// Code
}

Hook: wpaa_revoke_access

Description

File: import-users-from-csv-with-meta.php

Type: Action

Parameters: $user, $capability

Declaration:

do_action( 'wpaa_revoke_access' , $user , $capability );

Code exemple:

add_action( 'wpaa_revoke_access', 'prefix_wpaa_revoke_access', 10, 2 );
function prefix_wpaa_revoke_access( $user, $capability ) { 
	// Code
}

Hook: acui_log_main_title

Description

File: importer.php

Type: Filter

Parameter: $variable

Declaration:

 

Code exemple:

add_filter( 'acui_log_main_title', 'prefix_acui_log_main_title' );
function prefix_acui_log_main_title( $variable ) { 
	// Code
	return $variable;
}

Hook: acui_message_csv_file_bad_formed

Description

File: importer.php

Type: Filter

Parameter: $variable

Declaration:

echo apply_filters( 'acui_message_csv_file_bad_formed', __( 'CSV file seems to be bad formed. Please use LibreOffice to create and manage CSV to be sure the format is correct', 'import-users-from-csv-with-meta') );

Code exemple:

add_filter( 'acui_message_csv_file_bad_formed', 'prefix_acui_message_csv_file_bad_formed' );
function prefix_acui_message_csv_file_bad_formed( $variable ) { 
	// Code
	return $variable;
}

Hook: pre_acui_import_header

Description

File: importer.php

Type: Filter

Parameter: $data

Declaration:

$data = apply_filters( 'pre_acui_import_header', $data );

Code exemple:

add_filter( 'pre_acui_import_header', 'prefix_pre_acui_import_header' );
function prefix_pre_acui_import_header( $data ) { 
	// Code
	return $data;
}

Hook: acui_log_inserting_updating_data_title

Description

File: importer.php

Type: Filter

Parameter: $variable

Declaration:

 

Code exemple:

add_filter( 'acui_log_inserting_updating_data_title', 'prefix_acui_log_inserting_updating_data_title' );
function prefix_acui_log_inserting_updating_data_title( $variable ) { 
	// Code
	return $variable;
}

Hook: pre_acui_import_single_user_data

Description

File: importer.php

Type: Filter

Parameters: $data, $headers

Declaration:

$data = apply_filters( 'pre_acui_import_single_user_data', $data, $headers );

Code exemple:

add_filter( 'pre_acui_import_single_user_data', 'prefix_pre_acui_import_single_user_data', 10, 2 );
function prefix_pre_acui_import_single_user_data( $data, $headers ) { 
	// Code
	return $data;
}

Hook: pre_acui_import_single_user

Description

File: importer.php

Type: Action

Parameters: $headers, $data

Declaration:

do_action('pre_acui_import_single_user', $headers, $data );

Code exemple:

add_action( 'pre_acui_import_single_user', 'prefix_pre_acui_import_single_user', 10, 2 );
function prefix_pre_acui_import_single_user( $headers, $data ) { 
	// Code
}

Hook: pre_acui_import_single_user_data

Description

File: importer.php

Type: Filter

Parameters: $data, $headers

Declaration:

$data = apply_filters('pre_acui_import_single_user_data', $data, $headers);

Code exemple:

add_filter( 'pre_acui_import_single_user_data', 'prefix_pre_acui_import_single_user_data', 10, 2 );
function prefix_pre_acui_import_single_user_data( $data, $headers ) { 
	// Code
	return $data;
}

Hook: acui_auto_password_length

Description

File: importer.php

Type: Filter

Parameters: $12, $apply_filters, $apply_filters

Declaration:

$password = wp_generate_password( apply_filters( 'acui_auto_password_length', 12 ), apply_filters( 'acui_auto_password_special_chars', true ), apply_filters( 'acui_auto_password_extra_special_chars', false ) );

Code exemple:

add_filter( 'acui_auto_password_length', 'prefix_acui_auto_password_length', 10, 3 );
function prefix_acui_auto_password_length( $12, $apply_filters, $apply_filters ) { 
	// Code
	return $12;
}

Hook: acui_auto_password_length

Description

File: importer.php

Type: Filter

Parameters: $12, $apply_filters, $apply_filters

Declaration:

$password = wp_generate_password( apply_filters( 'acui_auto_password_length', 12 ), apply_filters( 'acui_auto_password_special_chars', true ), apply_filters( 'acui_auto_password_extra_special_chars', false ) );

Code exemple:

add_filter( 'acui_auto_password_length', 'prefix_acui_auto_password_length', 10, 3 );
function prefix_acui_auto_password_length( $12, $apply_filters, $apply_filters ) { 
	// Code
	return $12;
}

Hook: acui_auto_password_length

Description

File: importer.php

Type: Filter

Parameters: $12, $apply_filters, $apply_filters

Declaration:

$password = wp_generate_password( apply_filters( 'acui_auto_password_length', 12 ), apply_filters( 'acui_auto_password_special_chars', true ), apply_filters( 'acui_auto_password_extra_special_chars', false ) );

Code exemple:

add_filter( 'acui_auto_password_length', 'prefix_acui_auto_password_length', 10, 3 );
function prefix_acui_auto_password_length( $12, $apply_filters, $apply_filters ) { 
	// Code
	return $12;
}

Hook: pre_acui_import_single_user_single_data

Description

File: importer.php

Type: Filter

Parameters: $data, $headers, $i

Declaration:

$data[$i] = apply_filters( 'pre_acui_import_single_user_single_data', $data[$i], $headers[$i], $i );

Code exemple:

add_filter( 'pre_acui_import_single_user_single_data', 'prefix_pre_acui_import_single_user_single_data', 10, 3 );
function prefix_pre_acui_import_single_user_single_data( $data, $headers, $i ) { 
	// Code
	return $data;
}

Hook: post_acui_import_single_user

Description

File: importer.php

Type: Action

Parameters: $headers, $data, $user_id, $role

Declaration:

do_action('post_acui_import_single_user', $headers, $data, $user_id, $role );

Code exemple:

add_action( 'post_acui_import_single_user', 'prefix_post_acui_import_single_user', 10, 4 );
function prefix_post_acui_import_single_user( $headers, $data, $user_id, $role ) { 
	// Code
}

Hook: register_new_user

Description

File: importer.php

Type: Action

Parameter: $user_id

Declaration:

do_action( 'register_new_user', $user_id );

Code exemple:

add_action( 'register_new_user', 'prefix_register_new_user' );
function prefix_register_new_user( $user_id ) { 
	// Code
}

Hook: edit_user_created_user

Description

File: importer.php

Type: Action

Parameters: $user_id, $string

Declaration:

do_action( 'edit_user_created_user', $user_id, 'both' );

Code exemple:

add_action( 'edit_user_created_user', 'prefix_edit_user_created_user', 10, 2 );
function prefix_edit_user_created_user( $user_id, $string ) { 
	// Code
}

Hook: acui_email_passwordreseturl

Description

File: importer.php

Type: Filter

Parameters: $network_site_url, $string

Declaration:

$passwordreseturl = apply_filters( 'acui_email_passwordreseturl', network_site_url( 'wp-login.php?action=rp&key=' . $key . '&login=' . rawurlencode( $user_login ), 'login' ) );

Code exemple:

add_filter( 'acui_email_passwordreseturl', 'prefix_acui_email_passwordreseturl', 10, 2 );
function prefix_acui_email_passwordreseturl( $network_site_url, $string ) { 
	// Code
	return $network_site_url;
}

Hook: acui_import_email_headers

Description

File: importer.php

Type: Filter

Parameters: $array, $headers, $data

Declaration:

$headers_mail = apply_filters( 'acui_import_email_headers', array( 'Content-Type: text/html; charset=UTF-8' ), $headers, $data );

Code exemple:

add_filter( 'acui_import_email_headers', 'prefix_acui_import_email_headers', 10, 3 );
function prefix_acui_import_email_headers( $array, $headers, $data ) { 
	// Code
	return $array;
}

Hook: acui_import_email_to

Description

File: importer.php

Type: Filter

Parameters: $email, $headers, $data, $subject, $body_mail, $headers_mail

Declaration:

wp_mail( apply_filters( 'acui_import_email_to', $email, $headers, $data ), $subject, $body_mail, $headers_mail );

Code exemple:

add_filter( 'acui_import_email_to', 'prefix_acui_import_email_to', 10, 6 );
function prefix_acui_import_email_to( $email, $headers, $data, $subject, $body_mail, $headers_mail ) { 
	// Code
	return $email;
}

Hook: acui_frontend_save_settings

Description

File: importer.php

Type: Action

Parameter: $post

Declaration:

do_action( 'acui_frontend_save_settings', $_POST );

Code exemple:

add_action( 'acui_frontend_save_settings', 'prefix_acui_frontend_save_settings' );
function prefix_acui_frontend_save_settings( $post ) { 
	// Code
}

Hook: acui_cron_save_settings

Description

File: importer.php

Type: Action

Parameter: $post

Declaration:

do_action( 'acui_cron_save_settings', $_POST );

Code exemple:

add_action( 'acui_cron_save_settings', 'prefix_acui_cron_save_settings' );
function prefix_acui_cron_save_settings( $post ) { 
	// Code
}

Hook: acui_export_non_date_keys

Description

File: ./classes/export.php

Type: Filter

Parameter: $array

Declaration:

$non_date_keys = apply_filters( 'acui_export_non_date_keys', array( 'billing_phone' ) );

Code exemple:

add_filter( 'acui_export_non_date_keys', 'prefix_acui_export_non_date_keys' );
function prefix_acui_export_non_date_keys( $array ) { 
	// Code
	return $array;
}

Hook: acui_export_get_key_user_data

Description

File: ./classes/export.php

Type: Filter

Parameter: $key

Declaration:

$key = apply_filters( 'acui_export_get_key_user_data', $key );

Code exemple:

add_filter( 'acui_export_get_key_user_data', 'prefix_acui_export_get_key_user_data' );
function prefix_acui_export_get_key_user_data( $key ) { 
	// Code
	return $key;
}

Hook: acui_export_get_user_meta_keys

Description

File: ./classes/export.php

Type: Filter

Parameter: $meta_keys

Declaration:

return apply_filters( 'acui_export_get_user_meta_keys', $meta_keys );

Code exemple:

add_filter( 'acui_export_get_user_meta_keys', 'prefix_acui_export_get_user_meta_keys' );
function prefix_acui_export_get_user_meta_keys( $meta_keys ) { 
	// Code
	return $meta_keys;
}

Hook: wc_memberships_csv_import_user_memberships_data

Description

File: ./addons/woocommerce-membership.php

Type: Filter

Parameters: $import_data, $action, $columns, $row

Declaration:

$import_data = (array) apply_filters( 'wc_memberships_csv_import_user_memberships_data', $import_data, $action, $columns, $row );

Code exemple:

add_filter( 'wc_memberships_csv_import_user_memberships_data', 'prefix_wc_memberships_csv_import_user_memberships_data', 10, 4 );
function prefix_wc_memberships_csv_import_user_memberships_data( $import_data, $action, $columns, $row ) { 
	// Code
	return $import_data;
}

Hook: wc_memberships_csv_import_user_membership

Description

File: ./addons/woocommerce-membership.php

Type: Action

Parameters: $user_membership, $action, $import_data

Declaration:

do_action( 'wc_memberships_csv_import_user_membership', $user_membership, $action, $import_data );

Code exemple:

add_action( 'wc_memberships_csv_import_user_membership', 'prefix_wc_memberships_csv_import_user_membership', 10, 3 );
function prefix_wc_memberships_csv_import_user_membership( $user_membership, $action, $import_data ) { 
	// Code
}

Hook: woocommerce_subscription_payment_meta

Description

File: ./addons/woocommerce-subscriptions.php

Type: Filter

Parameters: $array, $subscription

Declaration:

$payment_method_table = apply_filters( 'woocommerce_subscription_payment_meta', array(), $subscription );

Code exemple:

add_filter( 'woocommerce_subscription_payment_meta', 'prefix_woocommerce_subscription_payment_meta', 10, 2 );
function prefix_woocommerce_subscription_payment_meta( $array, $subscription ) { 
	// Code
	return $array;
}



Carrito

loader