damiansmith86
Forum Replies Created
-
Tweaked the code myself and seems to be working as expected… just incase anyone else needs this:
add_action("um_registration_complete","um_042121_change_user_role", 1, 2 );
function um_042121_change_user_role( $user_id, $args ){
if ( isset( $args['company'] ) && strstr( $args['company'], 'Company Name' ) ) {
wp_update_user( array( 'ID' => $user_id, 'role' => 'um_staff' ) );
}
}Ive found this snippet that sets the role based on email, is there a way to tweak it so change based on “company” selected?
add_action(“um_registration_complete”,”um_042121_change_user_role”, 1, 2 );
function um_042121_change_user_role( $user_id, $args ){if( isset( $args['user_email'] ) ){
list($user, $domain) = explode('@', $args['user_email'] );
if ($domain == 'email.co.uk') {
wp_update_user( array( 'ID' => $user_id, 'role' => 'um_staff' ) );
}
}thanks
- This reply was modified 8 months, 2 weeks ago by damiansmith86.
Seems to be a few people on the official forums as well @jocasio – hopefully they are looking into it and will be resolved asap!
Forum: Plugins
In reply to: [Product Configurator for WooCommerce] Open configurator on page loadThank you very much @marcusig – the URL option was exactly what I was looking for.
Forum: Plugins
In reply to: [Shoppable Images] Editing image creates a broken duplicateThanks guys!
Forum: Plugins
In reply to: [WooCommerce Cart Abandonment Recovery] Emails not being receivedAlso, I am using WP Mail SMTP, which is configured and working.
Forum: Plugins
In reply to: [Related Links] Blocking the insertion of MediaThis plugin hasn’t been updated in 8 years now.
I’m getting a lot of errors from it so will be ditching it!Will this new update allow the use of WP SMTP? As currently the plugin doesn’t work with SMTP.
Thanks
Forum: Plugins
In reply to: [The Events Calendar] Showing events happening today<?php $current_date = date("Y-m-d"); ?> <?php $end_date = date('Y-m-d', strtotime("+1 day")); ?>
<?php query_posts(array( 'tribe_events_cat' => 'holidays','start_date' => $current_date,'end_date' => $end_date)); ?>
Any help would be great!
Forum: Fixing WordPress
In reply to: Disabling ‘New user’ admin notificationsThanks t-p, but this seems like a WP issue. I’ve seen a few people mention that they are struggling to prevent WP from sending admin notification emails in regards to new users.
Can anyone point me towards a script that does work with WP 5+?
Forum: Plugins
In reply to: [Swift SMTP (formerly Welcome Email Editor)] Plugin dosen’t workSame issue here! test email sends correct email, but I still get the wordpress email when a real user subscribes.
i have commented out all parts relating to apply3d in class-gf-sagepay-form.php but in IE only I still get the 5080 error ??
A lot of our clients use IE
Can you just tell me what I can delete in the plugin to temporarily fix this issue, SagePay are saying I can delete the remove the apply3dsecure part?
Hey,
It was SagePay themselves that told me about it. Here is the email they sent us:
——
Switching 3d secure off from the website or sagepay will not fix this issue. It is the field that the website is passing in the transaction registration post, to the gateway that is causing the invalid response.
The apply3dsecure field has to either be removed from the post, or amended and the white space after the 0 removed.
Please see below the string that we are receiving. Apply3dsecure is at the end of the post.
VendorData=42228&ReferrerID=CC923B06-40D5-4713-85C1-700D690550BF&Amount=390&CustomerName=xxxxxx xxxxxx&[email protected]&BillingSurname=xxxxxx&BillingFirstnames=xxxxxx&BillingAddress1=xxxx xxxx&BillingAddress2=xx xxxxxxx&BillingCity=xxxxxxx&BillingState=&BillingPostCode=xxx xxx&BillingCountry=GB&BillingPhone=&DeliverySurname=xxxxxx&DeliveryFirstnames=xxxxxx&DeliveryAddress1=xxxxxxxxx xx&DeliveryAddress2=xx xxx&DeliveryCity=xxxx&DeliveryState=&DeliveryPostCode=xxx xxx&DeliveryCountry=GB&DeliveryPhone=&FailureURL=https://www.bvt.org.uk/?page=gf_sagepay_form_ipn&SuccessURL=https://www.bvt.org.uk/?page=gf_sagepay_form_ipn&Description=Order #162631&Currency=GBP&VendorTxCode=162631-75cc4f5327bdb81c7758331af40d5a99&[email protected]&SendEMail=2&Apply3DSecure=0
We are still getting this error, on the user side it is a 5080 error, sagepay side a 3020 error relating to the apply3dsecure. It is caused by a white space at the end of the string sent.
This only occurs in IE, all other browsers are fine!