Changing a bit of text

Home Forums Ticket Products Community Tickets Changing a bit of text

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #1185403
    Math
    Participant

    Greetings
    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

    #1185514
    Cliff
    Member

    Hi 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.

    #1189415
    Math
    Participant
    #1189563
    Cliff
    Member

    For 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! 🙂

    #1189611
    Math
    Participant

    Hi 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?

    #1189637
    Cliff
    Member

    No, 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/

    #1190215
    Math
    Participant

    Hi

    Thanks. i managed to change the percentage string but i’m struggling with the “Product”.

    #1190529
    Cliff
    Member

    Well 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:

    Let me know if you get it working as desired.

    #1191032
    Cliff
    Member

    Math, 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!

    #1191063
    Math
    Participant

    Hi Cliff

    Thanks a million for the snippet it worked perfectly. Can i use the same snippet to change product in checkout for consistency?

    #1191067
    Math
    Participant

    This reply is private.

    #1191316
    Cliff
    Member

    I’m glad to hear that.

    Do you want the word “Product” changed throughout your entire WooCommerce, or only on the Cart and Checkout pages?

    #1191317
    Math
    Participant

    Hi

    I think through out will be best.

    #1191447
    Math
    Participant

    Another snippet will be great. I must say Modern Tribe support is worth every dime i paid for the plugins. Big up guys.

    #1191463
    Cliff
    Member

    In 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. 🙂

Viewing 15 posts - 1 through 15 (of 17 total)
  • The topic ‘Changing a bit of text’ is closed to new replies.