Home › Forums › Ticket Products › Community Tickets › Changing a bit of text
- This topic has 17 replies, 3 voices, and was last updated 9 years, 5 months ago by
Cliff.
-
AuthorPosts
-
October 31, 2016 at 12:03 pm #1185403
Math
ParticipantGreetings
I’ve managed to change a lot of words using the advice given on “changing any bit of text” but there’s just one i can’t seem to crack.I want to change the “site fee plus site percentage” that community organisers view on their dashboard, to “site fee plus credit card percentage”. I don’t charge a percentage but there’s a credit card fee which is a certain percentage.
How do i approach this one?Thanks
October 31, 2016 at 3:04 pm #1185514Cliff
MemberHi Math.
Could you please share your Community Events form link so I can see for myself?
And could you please provide me a quick video screen capture so I know exactly where you’re seeing this?
Thank you.
November 8, 2016 at 4:45 pm #1189415Math
ParticipantHi cliff
http://www.screencast.com/t/qZk24ON0Gq
http://www.ticketjoint.co.za/events/organiser/sales/event/2086/
I’ll also like to change “Product” to Ticket Type” in cart
November 9, 2016 at 5:50 am #1189563Cliff
MemberFor renaming things, you might benefit from the Say What plugin (third party, not guaranteed by us).
Or you could use the code snippet you’re already using for these items:
From /wp-content/plugins/the-events-calendar-community-events-tickets/src/Tribe/Main.php:
- __( ‘Site Fee: %s per order’, ‘tribe-events-community-events’ )
- __( ‘Site Fee Percentage: %s%%’, ‘tribe-events-community-events’ )
The WooCommerce cart’s table of cart items:
- _e( ‘Product’, ‘woocommerce’ ); when the is_cart() conditional is true
I hope this helps you finish your project! 🙂
November 9, 2016 at 7:41 am #1189611Math
ParticipantHi Cliff
I’m almost done with my project thanks to all of you for hand holding me through out.
Just to make sure i understand,
I take this code as is__( ‘Site Fee: %s per order’, ‘tribe-events-community-events’ )
__( ‘Site Fee Percentage: %s%%’, ‘tribe-events-community-events’ )and place it on the same snippet i’ve been using?
November 9, 2016 at 8:13 am #1189637Cliff
MemberNo, that’s the actual code from our plugin… it’s in the internationalization/translation format for WordPress strings.
So you want to translate Site Fee: %s per order in the tribe-events-community-events text domain.
So the Site Fee: %s per order string is really all you need to worry about if you’re using the code snippet at the bottom of https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/
November 10, 2016 at 4:29 am #1190215Math
ParticipantHi
Thanks. i managed to change the percentage string but i’m struggling with the “Product”.
November 10, 2016 at 12:02 pm #1190529Cliff
MemberWell the “Product” is in the “woocommerce” text domain so whatever code snippet you’re using — if it’s from that link I last sent you — will only target strings in our plugins’ text domains.
I’d suggest just using a WooCommerce Template Override:
- https://docs.woocommerce.com/document/template-structure/
- https://github.com/woocommerce/woocommerce/blob/2.6.0/templates/cart/cart.php#L36
Let me know if you get it working as desired.
November 11, 2016 at 9:12 am #1191032Cliff
MemberMath, if you have no other items in the WooCommerce cart to customize, here’s a snippet that would be even better than a template override for the cart.php file:
https://gist.github.com/cliffordp/431fe3a6d784079c9fe15bb8b205acc0
Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.
I hope this information helps!
November 11, 2016 at 10:22 am #1191063Math
ParticipantHi Cliff
Thanks a million for the snippet it worked perfectly. Can i use the same snippet to change product in checkout for consistency?
November 11, 2016 at 10:25 am #1191067Math
ParticipantThis reply is private.
November 12, 2016 at 6:19 am #1191316Cliff
MemberI’m glad to hear that.
Do you want the word “Product” changed throughout your entire WooCommerce, or only on the Cart and Checkout pages?
November 12, 2016 at 6:21 am #1191317Math
ParticipantHi
I think through out will be best.
November 12, 2016 at 10:01 am #1191447Math
ParticipantAnother snippet will be great. I must say Modern Tribe support is worth every dime i paid for the plugins. Big up guys.
November 12, 2016 at 12:15 pm #1191463Cliff
MemberIn that case, please use this snippet instead of the other one I provided you:
https://gist.github.com/cliffordp/e7177522eac641bf2051a363a29b2af1
Let me know how it goes for you.
And thanks for the kind words! I shared them with the team. 🙂
-
AuthorPosts
- The topic ‘Changing a bit of text’ is closed to new replies.
