Patriot06
Forum Replies Created
-
The enable jquery migrate helper plugin helped me get going again. After I activated it showed the following error:
jQuery Migrate Helper — Warnings encounteredThis page generated the following warnings:
jQuery.fn.live() is deprecated
Please make sure you are using the latest version of all of your plugins, and your theme. If you are, you may want to ask the developers of the code mentioned in the warnings for an update.
Forum: Fixing WordPress
In reply to: Add Roles after checkoutThank you both for your answers. I appreciate the guidance. Thank You.
Finally after two weeks I figured it out. The code is below:
`add_action( ‘profile_update’, ‘my_assign_employer_role_to_wcfm_vendor_users’, 10 );
function my_assign_employer_role_to_wcfm_vendor_users() {
$args = array(
‘role’ => ‘wcfm_vendor’, // Set the role you want to search for here
‘role__not_in’ => array( ’employer’ ), // If they already have abc role, we can skip them
‘number’ => ‘500’, // Good idea to set a limit to avoid timeouts/performance bottlenecks
‘wcfm_membership_id’ => ‘13125’, ‘13124’,
);
$wcfm_vendor_users = get_users( $args );// Bail early if there aren’t any to update
if ( count( $wcfm_vendor_users ) === 0 ) return;// get_users() returns an array of WP_User objects, meaning we can use the add_role() method of the object
foreach ( $wcfm_vendor_users as $user ) {
$user->add_role( ’employer’ );
}
}Fantastic @serafinnyc & @slash1andy! Thank you very much.
Marked Resolved
Fantastic!! Thank you very much for your help. I really appreciate it.
It was line 34 and it did clear the error so far.
I am using the latest version of Kleo. Version: 4.9.90
I switched themes to the Twenty Twenty theme and the error was still there.
I am sorry I spoke too soon. After rolling back the version the error is still there after all.
Hi Andrea. Thank you very much for your reply. I installed and activated WP Rollback and rolled back BP Profile Search to 5.2.4 and it cleared the error. Do I need to leave it at that version or do something so I can update it?
Sounds great. Thanks for the reply.
I have corrected the problem finally and forgot to update here. The problem ended up being with the Go Pricing plugin. Thank you for your response.