Title: PHP Snippet add to function
Last modified: November 17, 2022

---

# PHP Snippet add to function

 *  Resolved [andvines99](https://wordpress.org/support/users/andvines99/)
 * (@andvines99)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-snippet-add-to-function/)
 * I am using the following code snippet to change labels on a plugin for group 
   purchases. We have an issue with the labels running on to 2 lines and would like
   a line break.
    See [https://www.public-montessori.org/product/coaches-training-spring-2023/](https://www.public-montessori.org/product/coaches-training-spring-2023/)
   We’d like the checkbox and ‘Multiple purchases, or purchases for other(s)’ on
   a second line. (CSS doesn’t work).
 * **Below is the code snippet. How can I add a break to this to put the second 
   option on another line?** Thank you for any help.
 *     ```
       add_filter( 'wdm_gr_single_label', function(){
       // @todo Change the text to your individual label
       return __( 'Individual purchase for me', 'wdm_ld_group');
       });
   
       add_filter( 'wdm_gr_group_label', function(){
       // @todo Change the text to your individual label
       return __( 'Multiple purchases, or purchases for other(s)', 'wdm_ld_group');
       });
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-snippet-add-to-function%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Ilia .a11n](https://wordpress.org/support/users/iliadio/)
 * (@iliadio)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-snippet-add-to-function/#post-16218581)
 * Hi there,
 * As far as I understand, you are trying to edit some text strings on a plugin 
   you are using – I have a couple of alternatives to recommend here:
 * 1) Reach out to the plugin’s support team for assistance
    2) Use a plugin like
   [Loco Translate](https://wordpress.org/plugins/loco-translate/) to edit text 
   strings. I know it may sound strange to “translate” in your own language, but
   this is the best way to customize WooCommerce text strings, as the edits will
   not be overwritten when plugins are updated.
 * If this doesn’t help, and you still need assistance with your snippet:
 * Custom coding is outside the scope of our support policy, but our developer resources
   portal can help get you going: [https://developer.woocommerce.com/](https://developer.woocommerce.com/)
 * I will leave this thread open in case a community member can assist with this.
 * You can also visit the WooCommerce FB group – [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)–
   or the `#developers` channel of our Community Slack – [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)–
   We’re lucky to have a great community of open-source developers for WooCommerce,
   and many of our developers hang out there, too.
 * Hope this helps!

Viewing 1 replies (of 1 total)

The topic ‘PHP Snippet add to function’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [code snippet](https://wordpress.org/support/topic-tag/code-snippet/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ilia .a11n](https://wordpress.org/support/users/iliadio/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/php-snippet-add-to-function/#post-16218581)
 * Status: resolved