• Resolved Nitin Rathod

    (@rnitinb)


    Hello,

    I have created custom fields using our API and it works well but when I try to save ‘%admin%’ text in the custom text field then it is getting saved as ‘min%’.

    I have disabled my plugin and try to save that text in your field Address line 2 and it gives the same result.

    I am using latest version of WordPress and WooCommerce both.

    View post on imgur.com


    Please help me to sort out this issue.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    I managed to replicate the same thing on my side. Taking a cursory look at the code, I believe that’s happening as a result of input field sanitizing.

    Just to make sure: Can you share a bit more on why you’d like to use %admin% in that field? I’m asking as it doesn’t sound like a normal use-case for a store owner to add that to the “Address Line 2” field.

    Thread Starter Nitin Rathod

    (@rnitinb)

    Hello,
    thanks for the quick reply,

    I am not using ‘%admin%’ text in Address line 2 but I was just testing it into Address line 2 field.

    Actually, I made a plugin and it has some custom fields created by WooCommerce setting API where there is a page that sends an email to the user so I use ‘%admin%’ as a placeholder on that page to send an email copy to an admin user.

    But I can’t save that full text so I thought it was because of my plugin’s fault but after checking more I found that it happens with WooCommerce fields too so I deactivate my plugin and then again check for that by adding ‘%admin%’ text in Address line 2 and it happens again without my plugin active.

    Please let me know if you want more info.

    Thanks.

    Plugin Support RK a11n

    (@riaanknoetze)

    I see; Have you considered using placeholder strings that wouldn’t be flagged as containing characters that needed to be sanitized in an input field? In other words, instead of using %admin%, you could use admin.

    Thread Starter Nitin Rathod

    (@rnitinb)

    hello,

    Thanks for the suggestions and yes I will change my placeholders.

    BTW thanks for the quick response.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘min% text is not saved in custom fields api’ is closed to new replies.