This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'referring_affiliate_avatar_shortcode' ); | |
function referring_affiliate_avatar_shortcode() { | |
add_shortcode( 'referring-affiliate-avatar', 'referring_affiliate_avatar' ); | |
} | |
function referring_affiliate_avatar( $atts ) { | |
$output = ''; | |
if ( !is_admin() ) { | |
if ( !class_exists( "Affiliates_Service" ) ) { | |
include_once( AFFILIATES_CORE_LIB . '/class-affiliates-service.php' ); | |
$affiliate_id = Affiliates_Service::get_referrer_id(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'affiliates_new_affiliate_user_registration_message', 'example_user_registration_message', 10, 2 ); | |
function example_user_registration_message( $message, $params ) { | |
$message = 'Write here whatever you prefer your user should read in the welcome email.'; | |
$message .= 'User info can be found in the params array, like user object, username, user_id'; | |
return $message; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'groups_import_export_new_user_registration_subject', 'example_groups_import_export_new_user_registration_subject', 10, 3 ); | |
function example_groups_import_export_new_user_registration_subject( $subject, $user_id, $plaintext_pass ) { | |
$subject = 'Here you can add whatever you like to display as subject, in the notification mail a user receives for his new account'; | |
return $subject; | |
} | |
add_filter( 'groups_import_export_new_user_registration_message', 'example_groups_import_export_new_user_registration_message', 10, 3 ); | |
function example_groups_import_export_new_user_registration_message( $message, $user_id, $plaintext_pass ) { | |
$message = 'Here you can add whatever you like to display as message, in the notification mail a user receives for his new account'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Service | |
ServiceTypes=KonqPopupMenu/Plugin | |
MimeType=application/octet-stream;inode/directory | |
Actions=extract;extractTo;compress | |
[Desktop Action extract] | |
Name=Extract Here | |
Icon=ark | |
Exec=ark --batch %f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'affiliates_notifications_tokens', 'example_affiliates_notifications_tokens' ); | |
function example_affiliates_notifications_tokens( $tokens ) { | |
$tokens['your_token_name'] = 'your_token_value'; | |
return $tokens; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'affiliates_supported_currencies', 'example_affiliates_supported_currencies' ); | |
function example_affiliates_supported_currencies( $currencies ) { | |
$currencies[] = 'INR'; | |
return $currencies; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_after_account_downloads', 'example_woocommerce_after_account_downloads' ); | |
function example_woocommerce_after_account_downloads() { | |
if ( | |
class_exists( 'Groups_Group' ) && | |
class_exists( 'Groups_User_Group' ) | |
) { | |
$group_ids = Groups_Group::get_group_ids(); | |
$user_id = get_current_user_id(); | |
foreach ( $group_ids as $group_id ) { | |
if ( Groups_User_Group::read( $user_id, $group_id ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_affiliates_permanent_my_users( $atts ){ | |
$output = ""; | |
if ( is_user_logged_in() ) { | |
$user = wp_get_current_user(); | |
$args = array( | |
'meta_key' => Affiliates_Permanent::REFERRER, | |
'meta_value' => $user->ID | |
); | |
$users = get_users( $args ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'affiliates_thanks_sign_up_text', 'example_affiliates_thanks_sign_up_text' ); | |
function example_affiliates_thanks_sign_up_text( $text ) { | |
// the default text is this: | |
$text = '<p>' . esc_html__( 'Thanks for signing up!', 'affiliates' ) . '</p>'; | |
return $text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'manage_edit-shop_order_columns', 'custom_shop_order_column', 20 ); | |
function custom_shop_order_column($columns) { | |
$reordered_columns = array(); | |
// Inserting columns to a specific location | |
foreach( $columns as $key => $column){ | |
$reordered_columns[$key] = $column; | |
if ( $key == 'order_status' ) { | |
// Inserting after "Status" column | |
$reordered_columns['my-column1'] = esc_html( 'Referrer' ); |
OlderNewer