Remove labels/tags for customer details on order history printout

WPPizza – A Restaurant Plugin for WordPress Support General Support Remove labels/tags for customer details on order history printout

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7532
    maherali
    Participant

      Hi Olly. I understand how to change/remove everything on the order history printout using the code snippets you have provided. On customer details I understand how to remove a certain line i.e.

      add_filter(‘wppizza_filter_print_order_customer’,’myprefix_amend_customer_details’);
      function myprefix_amend_customer_details($details){

      // do a print_r($details); to get all keys – they will be something like [cname],[cemail],[caddress],[ctel] etc

      // so to remove the line containing the email address (key being [cemail]) do:
      unset($details[‘cemail’]);

      return $details;
      }

      But how do I remove the labels but not the line? I don’t need say:

      Email: [email protected]
      Postcode: Whatever the postcode is

      All I want is the end value without the ‘Email:’ and ‘Postcode:’ labels. How do I remove these labels without removing the data?

      Any help would be much appreciated as usual thank you.

      #7533
      Olly
      Admin & Mod

        as it happens, you cant really do that at the moment (well, you could if you write some regular expression, but that’s overkill)

        i need to add a parameter to the filter (or write this a bit differently – not sure yet) in the next update and will post something here (or – more likely, add an example to the codesnippet of these things)

        #7545
        Olly
        Admin & Mod

          doable as of 2.11.7.6

          see https://www.wp-pizza.com/topic/filteredit-order-history-print-output/

          there look for : wppizza_filter_print_order_customer_detail

          #7577
          maherali
          Participant

            Thanks Olly works a charm! Now I just need to figure out some other part non related to wppizza and launch my new website 🙂

            #8552
            maherali
            Participant

              Hi Olly thought i’d reply in here. I just changed the ingredients style to make it bigger and it looks great HOWEVER and i’m not sure this is even possible – is there anyway to make it so that each ingredient starts on a new line?

              Currently it is like this

              ITEM NAME
              INGREDIENT1, INGREDIENT 2, INGREDIENT 3 etc

              I would ideally like it

              ITEM NAME
              INGREDIENT1
              INGREDIENT2
              INGREDIENT3

              #8605
              Olly
              Admin & Mod

                i really cannot code everything for everybody here.
                look at the template and codesnippets and use your creativity.

                its doable with the filters available, just use a str_replace(',','<br />',$var); where appropriate

                #8606
                maherali
                Participant

                  Thanks i’ll see what I can do. I haven’t got my head around functions etc so i’m still finding it hard.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • The topic ‘Remove labels/tags for customer details on order history printout’ is closed to new replies.