
שלום וברכה!
אני רוצה לשנות באתר ווקומרס את המילים 'מעבר לתשלום' למילה 'המשך',
איך לעשות את זה?
בתודה מראש

שלום וברכה
יש 3 דרכים (לפחות) לשנות את זה:
1. לשנות את זה בתוך קובץ התרגום לעברית של ווקומרס. מומלץ להעזר בתוסף LOCO לצורך כך. אך השינו בתרגום עשוי להמחק לאחר עדכון ווקומרס ולשוב למצב ברירת המחדל.
2. לשנות בעזרת תוסף שמחליף את טקסט האתר בצד לקוח בלבד.
3. יש לי גם קוד שעושה את אשרות 2 בצורה דומה בלי תוסף אבל הוא לא תקף לכל האלמנטים.
תודיע לי על איזו דרך אתה מעוניין ללכת ואכוון אותך.
בברכה

השיב 3 חודשים אחורה
<p>לא מותקן אצלי תוסף תרגום, ואני מעדיף בינתיים לא להתקין אותו רק בשביל זה,</p><p>מצאתי קוד שמחליף טקסט באתר:</p><pre><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">function my_text_strings( $translated_text, $text, $domain ) {</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">switch ( $translated_text ) {</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">case 'מעבר לתשלום' :</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">$translated_text = __( 'המשך', 'woocommerce' );</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">break;</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">}</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">return $translated_text;</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">}</span><br style="box-sizing: border-box; color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;" /><span style="color: #3a3a3a; font-family: 'Varela Round', sans-serif; font-size: 13.68px; white-space: normal;">add_filter( 'gettext', 'my_text_strings', 20, 3 );</span></pre>
Please login or Register to submit your answer