Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
Cron job otgs_send_components_data runs now and then.

Solution:
- First, make sure the option in the "Theme and plugins reporting" section at wp-admin -> WPML -> Languages is disabled.
- Then, backup the site completely to prevent any issues and edit your child theme's functions.php file and add the following code to the file:

/**
 * Disable Cron for WPML data.
 * @link wpmlsupp-9731
 */
add_filter('pre_schedule_event', function($pre, $event){
    $otgs_share_local_components = get_option('otgs_share_local_components');
 
    if (!empty($otgs_share_local_components['wpml'])) {
        return $pre;
    }
 
    if ($event->hook === 'otgs_send_components_data') {
        return false;
    }
 
    return $pre;
}, 10, 2);

Relevant Documentation:

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 10 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
September 13, 2023 at 9:47 am #14388787

madeleinev-2

Hi there,
I'm currently cleaning up our cron jobs and found this entry.

A quick search provided me with this thread: https://wpml.org/forums/topic/data-collection-being-done-without-consent/

Unfortunately, I couldn't find any way to opt out. Please provide me with an answer how to opt out of this data collection.

September 13, 2023 at 3:32 pm #14391331

Subash Chandra Poudel

Hi there,

I have now escalated the issue to our 2'nd tier team.

I wills end you an update as soon as I have an update from the team. This might take some time though. Thank you for your patience and co-operation in the mean time.

Regards,
Subash

September 14, 2023 at 3:06 pm #14397945

Subash Chandra Poudel

Hi there,

The case is being looked upon by our team now.

In the meantime, can you please try the following workaround to disable the cronjob completely:

- Back up the site completely to prevent any issues.

- Add the following code to your child theme's functions.php file:

/**
 * Disable Cron for WPML data.
 * @link wpmlsupp-9731
 */
add_filter('pre_schedule_event', function($pre, $event){
	$otgs_share_local_components = get_option('otgs_share_local_components');

	if (!empty($otgs_share_local_components['wpml'])) {
		return $pre;
	}

	if ($event->hook === 'otgs_send_components_data') {
		return false;
	}

	return $pre;
}, 10, 2);

This will not register the next CRON job if reporting is turned off in WPML > Languages.

Regards,
Subash