Coder Social home page Coder Social logo

Comments (6)

n9yty avatar n9yty commented on August 16, 2024

Realizing that there are too many third-party plugins to probably support directly, I put in pull request #23 as a possibly better approach to #22 as it would allow each site to extend the supported fields. They would still have to determine what the form fields were and how to capture the data, but it would then make it user/site extensible rather than trying to accommodate every variation in the core plugin.

from woocommerce-coupon-generator.

JeroenSormani avatar JeroenSormani commented on August 16, 2024

Hey, sorry for not responding earlier!

Can you tell me how your #23 filter is different from the existing filter? I don't believe there's any difference and it has been possible to add additional meta data from the start.

(closing for now)

from woocommerce-coupon-generator.

n9yty avatar n9yty commented on August 16, 2024

I don't recall being able to make what we needed work with existing filters, but it is possible I missed it. Your reply would have been more helpful had you pointed out the use case and implementation. In my pull request I had given an example of how I was intending to use it, so if that can be duplicated with existing filters it would have been great to see it.

from woocommerce-coupon-generator.

n9yty avatar n9yty commented on August 16, 2024

Looking at the pull request (it was a long time ago) it seems I may have moved your filter down below because I had also added another one? But that is the problem with so much time having passed between when I was working on this and knew why it seemed necessary and now. :)

from woocommerce-coupon-generator.

n9yty avatar n9yty commented on August 16, 2024

Ok, I think I see the difference. Your filter was not passing $args in which I needed to be available to do whatever it was that we were doing. Again, I'm fuzzy at this point. Strangely enough this has just come back up here and I need to generate some sets of codes. But that is what I see in the code as far as differences between the original filter and what I put in, the $args array, and what that opened up in terms of making changes.

from woocommerce-coupon-generator.

n9yty avatar n9yty commented on August 16, 2024

It also have may be that I broke it out into two filters at the bottom so that anyone who had set up the existing filter wouldn't experience code breakage by changing it underneath them. This way they would get the data with any extra fields but wouldn't have to worry about the extra $args being sent.

from woocommerce-coupon-generator.

Related Issues (13)

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.