-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate job offer feature - issue with Polylang #2291
Comments
Polylang is proposing the following adjustment:
Allowing them to filter their translation taxonomies by adding a filter into their plugin:
Is this something you would consider for the next release? |
@dadish @fjorgemota @onubrooks Could we please add a filter to the WP-Job-Manager/wp-job-manager-functions.php Line 1530 in 28f871e
|
Thanks Gino for supporting that :) |
A user provided a solution from WPML for duplicate jobs in Resume Manager in 9002683-zd-a8c:
|
Support References This comment is automatically generated. Please do not edit it.
|
Hi guys, this is Diego from the WPML compatibility team. We got a new report for this issue here: https://wpml.org/forums/topic/jobmanager-resume-limit-count-is-false/ - the workaround from here resolve the issue. If you need any help from our team, please let me know. |
I run WP Job Manager with Polylang. To display all jobs in all language I duplicate the job offers and sync them with a custom function. This allows the users to modify their job offers in any language and making sure those changes are synced to the other languages as well.
When a job is synced with its translations some taxonomies are create by Polylang to link them together. The duplication of theses taxonomies to the new job offer also creates the issue/conflict with WP Job Manager duplication feature.
When duplicating a job offer WP Job Manager copies all available taxonomies, including the Polylang ones which will link the new job offer to the translations of the old job offer which just was duplicated. This is something that should not happen creating some issues with the translations and linking.
The file where the function is embedded is wp-job-manager-functions.php Line 1527-1535.
$taxonomies = get_object_taxonomies( $post->post_type ); foreach ( $taxonomies as $taxonomy ) { $post_terms = wp_get_object_terms( $post_id, $taxonomy, [ 'fields' => 'slugs' ] ); wp_set_object_terms( $new_post_id, $post_terms, $taxonomy, false ); }
Is there an option to add a filter hook before foreach to remove certain taxonomies? Or limit the copying to only a certain type of taxonomies which are related to WP Job Manager only?
Thanks for your input. Best regards Lens
The text was updated successfully, but these errors were encountered: