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
<?php | |
add_action('woocommerce_order_status_completed', 'um_woocommerce_approve_user_status'); | |
function um_woocommerce_approve_user_status( $order_id ){ | |
global $ultimatemember; | |
$order = new WC_Order( $order_id ); | |
$user_id = (int)$order->user_id; | |
$items = $order->get_items(); | |
um_fetch_user( $user_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
<?php | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
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
<?php | |
function um_custom_review_adjust_rating( $post_id, $old_rating, $new_rating, $new_user_id, $new_reviewer_id ) { | |
update_post_meta( $post_id, '_rating', $new_rating ); | |
$old_user_id = get_post_meta( $post_id, '_user_id', true ); | |
$old_reviewer_id = get_post_meta( $post_id, '_reviewer_id', true ); | |
update_post_meta( $post_id, '_reviewer_id', $new_reviewer_id ); | |
update_post_meta( $post_id, '_user_id', $new_user_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
<?php | |
add_action("init","um_custom_remove_conflicting_actions", 999999 ); | |
function um_custom_remove_conflicting_actions(){ | |
remove_action( 'signup_header', 'thim_multisite_signup_redirect' ); | |
remove_action( 'user_register', 'thim_register_extra_fields', 1000 ); | |
remove_action( 'register_post', 'thim_check_extra_register_fields', 10 ); | |
remove_action( 'register_post', 'thim_register_failed', 99 ); | |
} | |
?> |
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
<?php | |
/*** | |
*** @Get User Meta | |
***/ | |
// You can set the user id to retrieve the meta key value | |
// global $ultimatemember; | |
// $ultimatemember->user->set( $user_ID ); | |
echo um_user('first_name'); | |
// You can check some useful meta keys/values that you can | |
// retrieve with the above function here: https://codex.wordpress.org/Function_Reference/get_userdata#Notes |
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
[ultimatemember_account tab="general"] |
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
[ultimatemember_account tab="password"] |
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
[ultimatemember_account tab="privacy"] |
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
[ultimatemember_account tab="notifications"] |