Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

Tagged: 

This topic contains 9 replies, has 0 voices.

Last updated by Osama Mersal 1 day, 8 hours ago.

Assisted by: Osama Mersal.

Author Posts
February 4, 2026 at 11:36 am

seppoL

Hello!

I'm trying to use PublishPress Future -plugin to change category with some delay. The category changes, but only in the main language. The other two languages are set to the same category as the main, not to the translated category. See the screenshot...

Here is the site:
hidden link

This is the plugin:
https://wordpress.org/plugins/post-expirator/
hidden link

-Seppo

February 4, 2026 at 12:32 pm #17791356

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English )

Timezone: Africa/Cairo (GMT+02:00)

Hi again,

Please log in to this hidden link">sandbox site, install the PublishPress Future plugin, and try to replicate the issue.

If the issue is replicable, please let me know the steps to reproduce it so I can check it and consult our compatibility team.

Best regards,
Osama

February 5, 2026 at 7:34 am #17794528

seppoL

Hello!

Thank you for the sandbox.

I don't know if I'm doing this right, but the problem I'm facing still exists in this sandbox. The categories are not saved right with the Future action -plugin.

As you can see, the categories behave oddly. When I activate the delay with future actions, the category is not only wrong, but there exists one extra category (futureaction4.jpg -> "archive swe" AND "test eng")..

Bonus question -> When using Quick edit, the wordpress dashboard needs a refresh when switching categories? The changes are not visible until refresh (shift + F5)

-Seppo

futureaction4.jpg
futureaction3.jpg
futureaction2.jpg
futureaction1.jpg
February 5, 2026 at 11:25 am #17795773

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for replicating the issue. I've consulted our compatibility team and will update you as soon as I receive a reply.

In the meantime, please contact the PublishPress Future plugin support team and consult them regarding the issue.

Best regards,
Osama

February 10, 2026 at 12:33 pm #17808904

seppoL

Any news from the support team?
For your information (The screenshot)...

-Seppo

futureactions.jpg
February 10, 2026 at 12:37 pm #17808927

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for sharing the reply from the Future plugin. Our compatibility team has found a workaround, but we are still testing it. Here is the workaround:

1- Edit ...\wp-content\plugins\post-expirator\src\Framework\WordPress\Models\PostModel.php
2- Find the appendTerms() function and replace it with:

    public function appendTerms($termIDs, $taxonomy)
    {
        $postId = $this->getPostId();
        if ( ! defined('ICL_SITEPRESS_VERSION') ) {
            return wp_set_object_terms($postId , $termIDs, $taxonomy, true);
        }

        $lang = apply_filters('wpml_post_language_details', null, $postId);
        $langCode = $lang['language_code'];
        $termIDs = (array) $termIDs;

        add_filter('wpml_disable_term_adjust_id', '__return_true');

        try {
            $translatedIds = [];
            foreach ($termIDs as $termID) {
                $translatedId = apply_filters('wpml_object_id', (int) $termID, $taxonomy, false, $langCode); 
                if ($translatedId) {
                    $translatedIds[] = (int) $translatedId;
                }
            }
            $termIDs = array_values(array_unique($translatedIds)); 
            return wp_set_object_terms($postId, $termIDs, $taxonomy, true); 
            
        } finally {
            remove_filter('wpml_disable_term_adjust_id', '__return_true');
        }
    }

3- Same thing with the setTerms() function

    public function setTerms($termIDs, $taxonomy)
    {
        $postId = $this->getPostId();
        if ( ! defined('ICL_SITEPRESS_VERSION') ) {
            return wp_set_object_terms($postId , $termIDs, $taxonomy, false);
        }

        $lang = apply_filters('wpml_post_language_details', null, $postId);
        $langCode = $lang['language_code'];
        $termIDs = (array) $termIDs;

        add_filter('wpml_disable_term_adjust_id', '__return_true');

        try {
            $translatedIds = [];
            foreach ($termIDs as $termID) {
                $translatedId = apply_filters('wpml_object_id', (int) $termID, $taxonomy, false, $langCode); 
                if ($translatedId) {
                    $translatedIds[] = (int) $translatedId;
                }
            }
            $termIDs = array_values(array_unique($translatedIds)); 
            return wp_set_object_terms($postId, $termIDs, $taxonomy, false); 
            
        } finally {
            remove_filter('wpml_disable_term_adjust_id', '__return_true');
        }
    }

Best regards,
Osama

February 10, 2026 at 12:42 pm #17808936

seppoL

Ok, thank you!

Could you inform me when the support team has tested the solution?
I can make the workaround now, but it would be nice to implement it, when it is fully tested.

-Seppo

February 10, 2026 at 12:50 pm #17808953

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English )

Timezone: Africa/Cairo (GMT+02:00)

Hi Seppo,

Sure, I'll update you when we finish our testing.

Best regards,
Osama

February 10, 2026 at 1:00 pm #17809134

seppoL

Thank you, excellent support!

-Seppo

February 10, 2026 at 1:42 pm #17809438

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Would you please test the issue on the sandbox site and let me know if it works as expected?

Best regards,
Osama