Yuri-Lima / woocommerce-rest-api-ts-lib

This is some improvements for the oficial WooCommerce repo. https://github.com/woocommerce/woocommerce-rest-api-js-lib I hope they merge or accept it as new repo. soon. Please few free to contact me.
MIT License
29 stars 8 forks source link

Products data comes back with symbols #12

Closed PMLS3 closed 1 year ago

PMLS3 commented 1 year ago

When I call the products end_point I get the data back with symbols... all other endpoints work 100%.

END products 13:15:29 Response Status: 200 13:15:30 Response Headers: AxiosHeaders { 13:15:30 connection: 'close', 'x-powered-by': 'PHP/7.4.33', 'content-type': 'application/json; charset=UTF-8', 'x-robots-tag': 'noindex', link: 'https://fuchsmerch.co.za/wp-json/; rel="https://api.w.org/"', 'x-content-type-options': 'nosniff', 'access-control-expose-headers': 'X-WP-Total, X-WP-TotalPages, Link', 'access-control-allow-headers': 'Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type',
expires: 'Wed, 11 Jan 1984 05:00:00 GMT', 'cache-control': 'no-cache, must-revalidate, max-age=0', 'x-wp-total': '25', 'x-wp-totalpages': '1', allow: 'GET, POST', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding', date: 'Tue, 29 Nov 2022 11:15:30 GMT', server: 'LiteSpeed', 'alt-svc': 'h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"' } Response Data: ��↑�(+�▲↕Q��☺�HY8⌂⌂�♀s�����/��wb����A�L��♦cw �↕m�B�ZRJ��ۗ�N�.6$���ӗ�mBʋq�Mj↨♠����,s‼�a�.����7jLҘ1���W yF�♫�t���☼�nI�Q�vV;Kx�:` ↕S�¶���E=Z�jV��→����♣Y��A▬�dLS�v�f��►∟5��e�}��W�Ӄ.x,i$%�=���Ɓ�� ��ɏ��T�d↨R�}�cO�q:���♥y�^�t"��4�B↑ن��#◄���$�S��4�:LJ�♂mhM뉶4�S�♠&FV�C������▲���ٱ�m��‼�jXX>2A�2�¶����̵�o���ڟ��☼|����~Y���M�W��І♫~ � ٿ��@[�9‼r��§�� ���S>u�C��-5►dڇ�&\��<і^�W�c��D�dK�V~�V�ҕ�oM���8���S ~ކ��▲���r����‼mh=�t!↔�6�>��|↕�@[ʅ�♂��♥�I�lw�>�k0ö�S��∟↔K▲i;�)�d̺∟��d+×⌂W�→��↓�?�@ۥ����W��?]�-4tˊ�[�♦˓��h����7→d��↑↨�2 ~?@x�cy9♣����ZRl♦[%ܳ[��↕=�,��K![,�9li�▼.�t��%�t]]r�0�¤C���%�Ș�����ML♀TiK�LM'w����;�A7�2��"ݾ�♠���5��k,�Iz�d∟1��&-�\��⌂ 6� '|����⌂54�n���v)� j�w=�,�[tq������↑�&���c(�¶��8�hKS�0����§AC׹���8�OA_r����f_´♦�'��B7�e �w�§C�m▬�t�◄O�u�s�/�s�x�⌂�7t�'��◄b�����]w8&⌂�.▲G⌂ m'�$.N�∟�C�e�m+����♥��4↨���x�٦Nv�o�yq���☺�7��7��O�@:U♀ �hC}Jk��Q��☻/¶h��)��♣���(�↓‼↨��8>⌂▬��D��e��Ix�ixm�;5F�Xq��e���en��҆ιF>j‼��q~�▬l�H2Y����l�↔���▼��d��s�a��⌂�7�Yu�.��=!�L���Va�xm��▲c�֎!��ӝ+�☼�y↓‼m�e3���)�↕]F�♥�+�☼�☺(�?ϧ=��<♀�ʣ���G m�ޅ/z�RN[�{[i�♂t�%.�^J��▼▬k��;��X���a▬♦♂Y↑�ie↨↓�)�►0����<���Rb���$K�EkT��♦��<r�4w�?���>'�E���0�wy��∟l�↕�Rb���1�圧A{� ���↕��s↕e�5p�m↕��B����q�NH�ݛPվ��☻�♫�<q�m◄↔�u��t���4��cL �U◄j��q¶�W♂xճ���♦▲�♦Jiӏq→B�Z�x!=↨d►��ĶD]☼�◄5�+�!��♥E�2�� G�U�ไ#Gz���y�o����Q |:��F9!^ʞ}N),y�Rޙ�u�W¶W(�Deߎ���y�%�r:�⌂��↕R�↑�dN9↔�jE+�2���P▼�♥l�l�ñ�)���♫+���#�▼�d���►Jy�yb���Fe9��►∟�♀x�.9��"�♣�∟b]K�☼♂��4��♀��\�♫r�H=M^�]©�%xw��R!��h@����U�p�♦��/8�p1w► �G3<2Ƕ0j4�&���☺=��T�c�↑�݊§�♦¶�š��1\z��Wr)��¶B��►�]+♠ 6⌂���◄4>As�+h�[▼4↨�H♦���%�a�F↔↓�=��↑�n��L�▬1T��ߖ�Do��◄���9‼�|u �5‼�/ FJ�q�T2Q�W~♀��!T9xndẇsy�W�>�↔��X▬♠n�b↓ٖc♂h8♠��/8��♀��G7.K������͝�▲���☼�D�$62�▲G�)\D�>]����sDb�2{o→�↔§\p@{���1��%A�����Z�7�|��nA♂J�Lj��=�♥4�\@�♣�=h.�y��uG~$w�n�ܒ�oo�E~�~%VK����%d%d������Uҽy �/hΠy�♫↕OB+↓↨D4◄⌂��D��♂D♥>D��♂2@��↕m�яe�E'K������ص}�C♀�'��♠�Ȼ↕^��⌂��↕���s.♂�)�Ƕ9�zLa-�d�Uv�⌂hv�=����V⌂☺E↨���r�Jg8���Z�J�j�=Rߪ���m U�6T♥m�▬Q���☼�MC�/8�p[☺��P�hC��6l�E;�ڄ� ��R���N��K↨\6R�h�q �♥@x♂��↕]���t������RSJ↨.�>����/��v�+↑C�♥j0�☼�@v���C��kz0☺♂�☺c0♣[0v��Л[R�m��☼♦�"P���♥�☺▼t�▼�↔t��04▼���ڏ]i�=�[�d�↨w������a?�8������▲��q��T♥▬��▼�▼▼�=����a��:����Y⌂B♂݉C¶M�4�t8v�y�m� ♫e�]�~�↑ij�z]↑���V�d♀,G�A��j���▼�/♫ K����W�piZ�[^.��V�j�m�∟�ay��♂N3\t�S�����oz��~q�Y⌂��w/�wo�Ꝺ☻]8⌂t��}��u�♥-‼�J�#�'Ye ��"��3�(D��♥�<q!:�C��♠¶m�▲*qŜ����}t�����o��¶�¶C♫��s�YmzB{��~9☻���<'���C9☻ ♂�~�j9�▼�ڗ�Ҙ8�#@�D�r♦§q˃�5⌂☻�< F���s�rkE\►���/����p�♀�ˋa7E�6☼=?��?i��~<T�▲~����ƴ2wL�x��♣�l���mʘ��:��xwOY����ӝO,m���↕��◄⌂��e�й6�|�~bȊ�L�&�l�T9☻��}���O�z��?�-§��§�♦6�iWS���$sa2K%�hIX�N☺���→�%���[�4YG ♂[�b♠׿��↕�q������/ߋ��/���Fe������|7����+�(Z}up�X��r�B��►◄Ίڔ���l]♣d☻��*>�Q��3��Ϟ�On�u�p��qK

�8�P�J�¶b►o6v→���>�EЗr:ۯ���q�Ur,f߶♠Ղ�;�g‼�ؿ��▼���~3�����&4y��ل&�� �?e��♦� x¶��F�t�g►<��%♦/#x9�^Eh,��FV▲d՘���→��A�fk(�♦��r)E�↕�r��FP☺A��ќ���z◄��{��������♦� �6�Y#↑��♦�$Xs�� X�♠☺b♦(‼�A�☻∟♦x◄�→☺☺☻�F@ ☺§♦g#8�.Ap5�k◄ܜ�V♦�◄∟Ep�ޜ��♦☼�N��~����e�¶#������҈�^�2 9a"��0���V ↓V4‼��Ú�▼���2\�����~�^���8�gl����F��↓Q��◄�z��h���y$�(♫�\R��z��%�3�k6�↓�3�e%8?xh&kJe"y�}�6�и��񑸾�������0 ☼��t�A0☼�~L �������♂��♂|?;�/���♫�↕)�↨l���♠�1�,�ix5�!(��↕�J�@�/m���v���'P\\L�X��je}i�r�H�\��↑���y��↓�"mR�d�<�pJXM�?♠�9@�j��(���&��6�♂m�6t���↑↕a�►�װ �↨tt�→^�Ja&_♫7��Q>�♣��#�� @∟�#☺� �♂0�C0�K0�S0�[0�K0►��A#�����J♥♥"�F↑�G��JP���~☺◄��↨��3���↨♀���⌂��:UĔi0¶�',�\u��9O�O�� ��♦�*☼�˻s>���m@@��f2[W‼U]�|.o►Ņ◄���Ҋ�3�^h�5�;V�↔�g���F�$F�3e�z{���䫖�u��(→#d�[)��m▬�Cz6��˩�T�g8 L��►�g (H���u'��L&�§zF�⌂ֆ��♠>��~s��#hK����7܈s��-§\�˝�∟�►��&�?��7�F�8ƛ>ݍ��♀%G�∟Q�BiL �s�E����zk\�JԈΥb�♫�r:F�s��O�/♥ o�%��S��∟�"6����‼;�R�����→��¶↨v�p♂�|��9�� ▲☻☼��Zk♀�o���C�:��↔��'�j�=���C>Mq9�↨���[ƭ~§�ѲA]8n�S,�����J�Fc��y��↓�R�⌂9��!��u}�►��?4���%�j◄♫�x���t\��H�g\n)�N♠�!��*��▬�r����|��^Z�C��¶��M@��={�r���(�F%8�=� q�$G�x)�qMB:��N,�9f/(���I�^˦D�����▼�m\�0���@♀(5�▲D↑���'lk�0b�dk‼���N���!*�♦m��►lgmyJ�O������[L��l♀�!�l���5��/.▬�o�a☺b��♥wG♦Q��pMtu�►�'@ƅ♥��♦↨V�Ƿ �↨�i5↕5→;��sۂ��j♀�f�k1{�_V%�۠���8��K^♂yѼ�<��;�{8d"G�o"�◄Δ�h�f♦�[85_‼�#{f�.�q↔cB�NV!§U!\�X9�Ơh>hi��<W�| Z��▬o��~Q�↔+���a/竷k⌂�䨵���⌂��塐��j?���‼��J8y&�i↔㴎�uO�q�J��ٟ��‼�g?���p"s�ǘ☻ym�:.œ�¶��/:��m�3ɏ����� ����S\��♦�&lt�]Ή<ą�2��▲♫��ѧ¶��♀功r▲→�H�s��q�d♫�z��ne�+�谅����§{k�h�0�=M�ލ�q�yQ§♠6|1→♥��♫�3d������!�n���☺��F7:zق ,Op�Mq☻m♂�↔�▲r�D��F► ���r.V��{��X���↔U�k↔�']��ߑ��/d����p�ּ����G�Bqf�-▼�yi)�♠ ��J▬�p�f▼♂a��i ♥y���-T�H%�nݸ��g��§�c�b�!��q�����B�� �������#.G▼Ib����♫��je�oE�Aw◄↓��8�h�j�⌂‼@��#�k�j�0→;���;��p9��e�"X�;eX@�~w�♫�▼��D� �����◄��P☺2�0 ��I�i�U�a�#��<^�►xp☺�l��9▲♫9 pA�↨��(���P♫Z��򽅼�� ↓♣������CL��4☻���Z▬6��{��►�‼���L�1�1��X3;6lg�qڠ���E�^H����"Q�;h���v���㱰�>�¶��D�)��w�;���♠\i��`��ʕ��+.i�0��‼���B8�↑��◄�Ċg9�§:�B�q,�4�Ʊ♦�=Zk�[p���9�∟��p�1���b9�9O˹Z��rΖs�<��ʜl�vIh♥s,� F�ܞ�Y�ig5�<f��y,↕<�y ��)}�X"[�ƃ �S�:▬��?�������5��v�↨☻�▬����i�e3�U�H�]���o§����♠�F��؂8���p^↕�♥0♥�4�F♂z�j�\�V‼t� �K������↕�m�cf@<��ѣ� �U�AMh�♫� �↔z☺\k�↑S^ڪ�ȏ�0�♣-O�\��E�↓↔GtQ�f↔�^uD�~�0m9b[����ұBM-=♀���t�M�X=¶D�2v �%]p�T���q8������%�a���t��L��ڧ�:�|c�§��=�'��☼��ۃG>♥1O�p����un�m����3‼��6%fc↑�v��}��hỨ��gnc�r�u5Z�)5��{§ķ�2b��M↨��li�"♣�8�♀%�hKj¶▲☺↑�ЗN�D�→m→�Vδ��§���4b@����zm@H▲[�fRB)��9VR��d♂8[Q`�xU�����tes��A�"��\EQ§��(�B��-�Z���N2§p↓5)!<�t�q���3�U��f4�L�c�ZǠ:m;♣m.�\�♠��c�ڀeG�1O̰ژ��!�W�▼t�Bk6v"na�<3☺��!��:��ޅ⌂죇���►sd��f��QʯVַUB�◄�P�z4�♣�DM�☻���↓�♦[�⤀zn�8 �Z∟�W♠S��0V�☼�§�H��.vvR♫�♀oi�����∟♫◄�P�-��!�↓�[�a♥5∟����d��♀♦](�N!���q��u�[ �D♫��XA�%♫→§#�▬r�(�▼Qu�v�T�~�☺1
I�U��8�◄�v��6_|���X����⌂��[�ή�N���♂�YK�'E��N�O+��♥J.��P�@�� ֍dĺ�↨�����i��=�a�/♦�B|(Fc↑�u��}�♂��R��☼♥5?�W�v�d♣�♦Z��,�↕�N��85�^>�N�2�fJ���b���~~C>|�D2☻��7�o������♥#��@�i��~w���ȅQ�2sJ�q�(^���☺+☼%9(�Ei��x�,↨�x��#��|5�������]BK�8�→�#��κ��∟B♂��c��4�F�N�;Ak��vM��˧4��Q��uy츦Ğ|Jl�h�ʞ]rO��=(▲P‼��`6v
Q�
�� ׂki↔X��S� →�#A��ފ��fW>����h~y���]�▼��^�q�▼▬7F�kJ�ɧԐ%�'?�↑\�♣OJ@��R���#�a�y� ��g0�˸��������?ߐ\�36Й<��
.��ǀO>�J�n�����xH/����i�♥�e�↕��ҟ���4~♀�/�;�F�J[[�Y�b��↑2�^(��2�(S♥*2ԥ�i �g��♫����2�v���͚m♥rs4♠^▼�wx���͗:�u����@Y�:���\�→‼N����a����@��,���Ya���h♣�iz,�♣q∟s♂���ڥ�2CB▼�� �p��>▬�♣�^K������ea�XƖ �ec�Z���emY�♣ӊ����1D�§���� lV�g�♫t�Z��l�§6H�♫wa"�♦Y�#�����♀♠�?�O��^♫�ׅ↔|Jl♫S�.���♀♦I����#n���`�U♥L�u�#s�v�♣���) ��0���[ଃ��έ�‼�n→◄z��e��O���6�♣��►��‼���r�a� ☼8/`Q�♦▼|B�;�-▼AKx����m♫‼↔�▼ �0�i:�u�☼R�a�D�dJi�P�AO�☻↕Q�남��Uh��F�N:rs♣"9�=R��}��q7��C��}‼s8��x�0��td�↑��↓S!>�{�V♫♫�8▲rF#♀,Բ��-k�����q�[r,�h∟7�la�Vyh�N����J�V��PH��#→ )&⌂�wk▲r����k��|�l� ]�‼]♥�)�5|���bJ�$Wfc�Q�Y♣↔���:�◄�§?↔���н:�gG��▼ǿC♀��$L�↨[�@�]���������9��☻�5��↕�g����U�"�6�♫☼�→o)�VTF"���g6�¶WC5,��↕�0��7y� b�v�b'��V▬��G¶B���♠FBI��v�4}0 ▬�&↑'�d�L�m2N��2‼n��@��1�♣,�U�������►���[� ��,��▲��♂�,�{→�fk⌂��dL♣���>�5▲�♥C���3♫T�ϑ���◄��Xϩ��‼ x�En^��a6♠ޜwx�!/K=.▬�׻�q�(�e�b��[&�y-�♀�d(&C��k��♀Ud�J���܊̡d� F��d�F��l�⌂▲2?+�w�B↓�'2��☺↕�♦^§♠���HI��k¶}(�V��;�↓‼i�◄�☼`→��b-�♫� ���JJ+͝↕��ޱ%Xb��)��T��F��?Y�☺F{� !��V� ��|�qր�����a♂��h��ĵR�/e↑���%bA3↨���)Mԅ;������a7?�N6ǡK���&L�³��"H� ♦���↔�:�æ������[1�T���֩↨�����Y☺��↑���"=Ϟ��m!��ĸF�[↑ ���♀��۸�♀VLjo4d♥�!�!.��xn�d ���r☺�,2W��!�d�p��↨�↓����Y⌂�tf��Gi/c↨V�%A�k~w�϶����q����Z����f8?↔���<▼w�|�3g�=.{S�h��౶↨�R�I�#j4[W�R|��¶��<���◄%F�qB]��1�f��|~¶◄����D�↓�↨nY�9Z��♀y��տ"8.��W�P�♫ԡ♥F�� ∟M�cč���0M�SK↓� M�1��6K�%��Y♂����'M��O&�"�$�d�l�i�M��:YfB�'��֢朑bԤY→#� �↕�D��f�jC�Ar♥C� ��<�I�.♂Mיn���Ng♀]�n���$��D%9W+Ԕ�o��[��� ��kR�>7Jf5§�l4v�↔�wx��}���]☺|�◄kdl►ؓ-F�♠�♦�|�§z7☺�(��▬�~��☺♥ Total of pages: 1 13:15:30
Total of items: 25 13:15:30
END products 13:15:30
Response Status: 200 13:15:30 Response Headers: AxiosHeaders { 13:15:30 connection: 'close', 'x-powered-by': 'PHP/7.4.33', 'content-type': 'application/json; charset=UTF-8', 'x-robots-tag': 'noindex', 'x-content-type-options': 'nosniff', 'access-control-expose-headers': 'X-WP-Total, X-WP-TotalPages, Link', 'access-control-allow-headers': 'Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type',
expires: 'Wed, 11 Jan 1984 05:00:00 GMT', 'cache-control': 'no-cache, must-revalidate, max-age=0', 'x-wp-total': '25', 'x-wp-totalpages': '1', link: 'https://fuchsmerch.co.za/wp-json/wc/v3/products?per_page=100&page=1; rel="prev"', allow: 'GET, POST', 'content-length': '6', vary: 'Accept-Encoding', date: 'Tue, 29 Nov 2022 11:15:30 GMT', server: 'LiteSpeed', 'alt-svc': 'h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"' } Response Data: [] 13:15:30
Total of pages: 1 13:15:30
Total of items: 25

Yuri-Lima commented 1 year ago

@PMLS3 Can y paste part of that code? Because I've just tested and worked fine.

Screenshot from 2022-11-30 19-37-41

But anyway there is pre-releases. Try

npm i woocommerce-rest-ts-api@5.0.0
PMLS3 commented 1 year ago

code

Do you mean this?

Okay, I have tested it on another Woocommerce site and its working. Must be being blocked by clients website, which is weird because its only the products.

Thank you for your time