How to access data from the client
I’m currently working on a React based Gutenberg theme. I’m trying to create a page that displays product information from WooCommerce.
It looks like the way to get data is through the WooCommerce REST API. However, it seems like I shouldn’t put the generated keys in the React code, because that would leak the keys to the client.
Is there a recommended way of handling this? My best ideas seems to be to write an intermediate API (probably extending the WordPress API) that can read the keys from environment variables or WordPress options.
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس