דלג על הניווט

תגיות: 

נושא זה מכיל 0 1, יש ל 0קולות.

עודכן לאחרונה על ידי Andrea Notari לפני 3 ימים, 7 שעות.

בסיוע: Paola Mendiburu.

מחבר פוסטים
יוני 25, 2025 ב-10:29 am #17168624

Andrea Notari

Background of the issue:
I am trying to translate WooCommerce endpoints in WPML for multiple languages on a site under development. I followed the solution provided in this forum post: https://wpml.org/it/forums/topic/issue-translate-label-custom-woocommerce-endpoint, but it does not work. I also referred to this documentation: קישור נסתר.

Symptoms:
The solution for translating WooCommerce endpoints in WPML does not work.

Questions:
Why doesn't the solution for translating WooCommerce endpoints in WPML work?

This is ny endpoint code and I need to translate Album label and Lorem ipsum text.

-------------

add_filter ( 'woocommerce_account_menu_items', 'album_custom_endpoint', 40 );
function mjal_custom_endpoint( $menu_links ){

$menu_links = array_slice( $menu_links, 0, 5, true )
+ array( 'album' => __( 'Album', 'album-custom-endpoint' ) )
+ array_slice( $menu_links, 5, NULL, true );

return $menu_links;

}
// Register new endpoint permalink

add_action( 'init', 'album_new_endpoint' );
function mjal_new_endpoint() {
add_rewrite_endpoint( 'album', EP_PAGES );
}

// Add content inside your endpoint

add_action( 'woocommerce_account_album_endpoint', 'album_endpoint_content' );
function mjrd_endpoint_content() {
?>