• Resolved Kunal

    (@kunalnagar)


    Hi,

    I am using the following 4 plugins on my website:

    Events Manager
    WPML
    Events Manager & WPML Compatibility
    WooCommerce
    WooCommerce Multilingual

    In a previous ticket, I mentioned that I would like to replace Google Maps with Baidu Maps (for example while creating a new location)

    Instead of changing the plugin code itself, I created a new MetaBox for entering Location and added custom event handlers for address, town and country (required fields). I am using the following filter to save my location:

    add_filter( 'em_location_save', 'mm_location_save', 1, 2 );
    public function mm_location_save( $result, $EM_Location ) {
            global $wpdb;
            update_post_meta( $EM_Location->post_id, '_location_address', $_POST['location_address'] );
            update_post_meta( $EM_Location->post_id, '_location_town', $_POST['location_city_town'] );
            update_post_meta( $EM_Location->post_id, '_location_latitude', $_POST['location_latitude'] );
            update_post_meta( $EM_Location->post_id, '_location_longitude', $_POST['location_longitude'] );
            update_post_meta( $EM_Location->post_id, '_location_country', 'CN' );
            return $result;
        }

    While my location is saved and I can see it listed in the Locations table in the admin area, I am unable to select it while adding an event.

    I researched a bit on this and found out that while the location is getting saved, the POST ID for the location is clashing with an entry in the wp_icl_translations table with an element type of tax_product_cat

    Since there is no entry of the location post_id in the wp_icl_translations table, it does not appear in the auto-complete while adding events.

    I know this is too long but can anyone shed some light on why this might be happening?

    https://www.ads-software.com/plugins/events-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    hmm, can I know if this works when you temporarily disable WooCommerce plugin ?

    Thread Starter Kunal

    (@kunalnagar)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ICL Translations Insert not Working’ is closed to new replies.