Kunal
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom 404 Pro] Plugin settings don't show upA new tab is added to the WP Admin Dashboard called “Custom 404 Pro” when you activate the plugin. Can you send me a screenshot/log of any errors that you might be facing?
Also, I have mentioned in the description of the plugin that it’s very hard for me to maintain issues in multiple places. Please create further issues on the Github Repo.
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataNo problem. Thank you for the help!
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataIt worked. Thanks! ??
Marking as resolved.
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataOkay, so the problem is the action. I am unable to save any xprofile fields in the social login action.
add_action( 'oa_social_login_action_after_user_insert', 'update_base_user_profile', 10, 2 );
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataFor a minute, let’s work with what we have. I’m getting the User ID, so I can get the User Meta. I have the First Name and Last Name.
But I’m unable to save the First Name and Last Name field data for that user. So technically, it seems like a Buddypress problem? I have other xprofile fields at various stages of the signup and they are working absolutely fine. Only First Name and Last Name are not saving after Social Login.
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataI’m using Version 4.6
Forum: Plugins
In reply to: [BP xProfile WordPress User Sync] Cannot save via xprofile_set_field_dataHi Denver,
Unfortunately that isn’t working. Now I’m facing a new problem.
When I try and signup, I get a warning:
Warning: Missing argument 2 for update_base_user_profile() in \wp-content\themes\twentytwelve-child\functions-partials\redirects.php on line 95Here is the code:
add_action( 'oa_social_login_action_after_user_insert', 'update_base_user_profile' ); function update_base_user_profile($user_data, $identity) { $temp_user = new WP_User($user_data->ID); $temp_user->remove_role('subscriber'); echo '<pre>'; print_r($user_data); print_r($identity); echo '</pre>'; die(); xprofile_set_field_data('First Name', $user_data->ID, $identity->name->givenName); xprofile_set_field_data('Last Name', $user_data->ID, $identity->name->familyName); }
Line 95 is
function update_base_user_profile($user_data, $identity) {
So I tried changing the add_action to
add_action( 'oa_social_login_action_after_user_insert', 'update_base_user_profile', 10, 2 );
And that got rid of the warning. But in the $user_data field I’m getting the User ID and in the Identity field I am getting 1.
I tried deactivating the WooCommerce plugins (both of them) but it did not work. Technically, it shouldn’t because you are just deactivating the plugin. That won’t have any effect on the table in the database unless you delete the plugin ??
Been there, done that.
So I decided not to mess with the plugin’s code.
Basically, I am getting the data from Baidu Maps and then passing it over to the plugin hooks. The best way I have found on how to go about this is to replace the Metabox itself.
For example, when you add a Location, there is a Where metabox. I have replaced that with my own custom metabox that takes into account Baidu Map Data. I am then using the following plugin filter to save the data:
add_filter( 'em_location_save', array( $this, 'mm_location_save' ), 1, 2 );
I hope that makes sense!
So basically, if I get the same data that Google Maps is getting via the Baidu Maps and send it to the plugin hook that saves it as an event, you’re saying it would work right?
Just getting my facts straight, thanks for bearing with me!
I have no problem overriding code as long as there are hooks available. You’re saying that there are no hooks available also to override Google Maps functionality?
Lots of coding? Can’t we just replace the Google Maps Object with the Baidu Maps object and hook into the events as it says in the article?
Hi Angelo.
It is the same URL that I posted above.
Hi there,
Sorry for the late response.
First of all, there is an API for Baidu Maps that is similar to the Google Maps API.
I was going through the plugin documentation and found this link: https://wp-events-plugin.com/tutorials/modifying-event-location-google-maps/
Here, we have the following snippet:
jQuery(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){ .... });
Can the map object that is being returned here be replaced with a Baidu Map object? If yes, could you give some insight?
Forum: Plugins
In reply to: [Multisite Language Switcher] Edit Post White ScreenWow. Thanks a lot Dennis, it worked! Instead of the drop down list, I get a text box with an autocomplete I guess? Not a problem!
Cheers ??