• Resolved Frique

    (@frique)


    The plugin doesn’t seem to use official methods like “$product->get_name()” or “$product->get_description()” to gather product data, but rather queries the database directly. This goes against the modern WooCommerce way of doing things and more specifically it means I can’t manipulate the values that will be returned (in more advanced ways than the field mapping options that the plugin provides). Am I missing something or is this something that might be improved upon?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello Freque,

    Thanks for your topic!

    Indeed some data is selected through queries to the database directly. This is done because the data items required to generate a specific feed can differ a lot from feed to feed. By making a configurable select query I can fetch the correct data in one stroke, without having to run through all WooCommerce functions.

    Wherever it is possible to use the official methods I do use them (see class-variations, the variation_conversion_table function)

    If you want to manipulate the values that go in your feed, you can use the wppfm_feed_item_value filter (https://gist.github.com/Auke1810/c62bb043926f539f9a99b418c06a3e6e)

    But I do agree with you that it would be better to always use the WooCommerce functions. I will have a better thought about this topic and maybe I can develop a better way to do this.

    Thread Starter Frique

    (@frique)

    Hi Michel,

    I did not know about the “wppfm_feed_item_value” filter. That will work just fine for now. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Missing ability to filter values’ is closed to new replies.