dalenguyen / firebase-wordpress-plugin

A plugin that helps to integrate Firebase to WordPress
https://firebase-wordpress-docs.readthedocs.io
GNU General Public License v2.0
110 stars 31 forks source link

bring just one information of this id. #135

Closed mcollinar closed 3 years ago

mcollinar commented 3 years ago

Describe the bug Hi Dale... Can you help me with something? I want to bring just one information of this id......I want to bring just the "bairro" information... Im using this shortcode: [firestore class='x' collection_name='Users' document_name='getFirebaseUid' display_fields='endereco' display_type='blocks']

And its returning this: {"deleted_at":null,"endereco":"Rua Clemente Pereira","updated_at":1597265395791,"lng":-46.5984293,"cep":"04216-060","complemento":"","created_at":1597265395791,"lat":-23.597714699999997,"estado":"São Paulo","bairro":"Ipiranga","numero":"709","cidade":"São Paulo"}

I just want to creat a shortcode that bring this information: Ipiranga... The name of the display field is endereco/bairro ....

Is it possible?

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots The version of the plugin. E.g PRO v0.5.5

Screenshots If applicable, add screenshots to help explain your problem. You can find the error code from inspecting the browser.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

dalenguyen commented 3 years ago

Hi @mcollinar, can you try if this works?

[firestore class='x' collection_name='Users' document_name='getFirebaseUid' display_fields='endereco.bairro' display_type='blocks']

It will get the value inside the object.

mcollinar commented 3 years ago

Yeahh...It works...

I didnt found this information on https://wordpress.dalenguyen.me/ .....

Thanks

dalenguyen commented 3 years ago

Yeah, it recently updated. An example can be found here: https://wordpress.dalenguyen.me/display-firestore-collection-as-blocks/

I hope that you are on the email list. I will send an update every week on the product.

mcollinar commented 3 years ago

The last update has the sync data with woocommerce ?

Em ter., 15 de dez. de 2020 às 16:35, Dale Nguyen notifications@github.com escreveu:

Yeah, it recently updated. An example can be found here: https://wordpress.dalenguyen.me/display-firestore-collection-as-blocks/

I hope that you are on the email list. I will send an update every week on the product.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dalenguyen/firebase-wordpress-plugin/issues/135#issuecomment-745518339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRGQOMCQQCFTPSQIB6ZRC3SU627PANCNFSM4U4KLYHQ .

-- Marcelo Collina mcollina@gmail.com www.facebook.com/marcelo.collina

dalenguyen commented 3 years ago

Yes, but this object change was sent out on Nov 14.

https://firebase-wordpress-docs.readthedocs.io/en/latest/misc/changelog.html#v1-5-0-2020-11-14

mcollinar commented 3 years ago

I dont know how to sync the products in firebase to woocommerce :/

dalenguyen commented 3 years ago

Hi @mcollinar, you will need the Firebase Integrate Woocommerce extension in order to do that.