Git Product home page Git Product logo

Comments (8)

duracelltomi avatar duracelltomi commented on July 18, 2024

Hi,

This is more about how wp_json_encode (calling json_encode) converts a PHP variable into a JSON string.

If it sees a number, it will be encoded as a number, not as a string.
What you could you is to create a custom JS variable inside GTM and iterate through the items array and convert all item_id value to string if necessary.

from gtm4wp.

StSaens avatar StSaens commented on July 18, 2024

Hi, thanks for your response.
I dont fully understand, since it's a change from 1.19.1 to 1.20

v1 19 1
v1 20

from gtm4wp.

duracelltomi avatar duracelltomi commented on July 18, 2024

Well, that is strange...

from gtm4wp.

duracelltomi avatar duracelltomi commented on July 18, 2024

Oh, I see, there was another ticket about this. They asked me to make sure the item_id is an integer when it is an integer and not a string :-)

So, who is right now? ;-)

from gtm4wp.

StSaens avatar StSaens commented on July 18, 2024

The standard.

from gtm4wp.

duracelltomi avatar duracelltomi commented on July 18, 2024

Deal :-)

from gtm4wp.

StSaens avatar StSaens commented on July 18, 2024

Great!
Is there an issue id with the other request you're referring to? I am interested in their use-case.

from gtm4wp.

duracelltomi avatar duracelltomi commented on July 18, 2024

Fixed in b3ee9ac

from gtm4wp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.