WPML VS wpfc_clear_post_cache_by_id()
-
Hello,
I work with wpfc_clear_post_cache_by_id() to delete cache programaticly.
But this function doesn’t work with WPML.
In fact, at line 936 : $permalink = urldecode(get_permalink($post_id));
the function return bad URL in others language, you must apply WPML’s filter and so, the cache file is not delete.So I added this 3 lines just after the line 936 :
if (function_exists( 'wpml_get_language_information' ) ) { $post_language_details = apply_filters( 'wpml_post_language_details', NULL, $post_id) ; $permalink = apply_filters( 'wpml_permalink', $permalink,$post_language_details['language_code']); }Thank’s
L
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘WPML VS wpfc_clear_post_cache_by_id()’ is closed to new replies.