New Landing How can we help? Atelier get_post_meta() doesn't work when this theme is active..??

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Atelier
  • #192021
    AntRubano1
    Member
    Post count: 16

    I am the developer of the Offers for WooCommerce plugin. A user of the plugin that is using this theme reported that the plugin was not working correctly, but only when this theme was enabled. It works fine with other themes.

    Upon researching the issue it seems that the get_post_meta() function is not returning any data for us within the plugin. I also notice that the theme seems to be using sf_get_post_meta() instead (and uses that same prefix in front of pretty much every function I see being used.)

    I’m a little bit confused on how to handle this. Am I supposed to check to see if the Swift Framework is being used, and if so, add the sf_ prefix to all the core WP functions we use? That seems like an odd thing to have to do. Is there some other way I should be handling this so that my plugins work properly with your themes/framework?

    Any information on this would be greatly appreciated. Thanks!

    #192025
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Will have to forward this one to our head developer.
    Thanks

    -Rui

    #192045
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @AntRubano1

    Thanks for reaching out to us. sf_get_post_meta does not override get_post_meta in any way, it simply retrieves the theme meta by making one call to the get_post_meta function, rather than tens/hundreds of times.

    We’ll happily check the plugin here and see where the issue lies if you can attach it for us.

    Thanks,

    – Ed

    #192048
    AntRubano1
    Member
    Post count: 16

    Here is the plugin

    Attachments:
    You must be logged in to view attached files.
    #192167
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    I get these errors when enabling offers on a product – https://www.dropbox.com/s/vp0hvdxyecjob4s/Screenshot%202015-07-06%2019.37.28.png?dl=0

    Same with T15 theme.

    – Ed

    #192171
    AntRubano1
    Member
    Post count: 16

    Well, that is very strange. We are unable to reproduce that here on any theme.

    Can you please go into the Settings -> Offers for WooCommerce -> Display and just click save. Maybe we forgot to set defaults in the database and they aren’t holding until you save, by chance..??

    Sorry, I know that has nothing to do with your theme/framework, but I’m thinking maybe that’s the only problem, and then you can reproduce what we’re seeing with the theme.

    #192172
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    That was it, thanks.

    Tested again on both Atelier/T15, and when I submit the form, I get:

    Uncaught SyntaxError: Unexpected token < dev/:1

    – Ed

    #192183
    AntRubano1
    Member
    Post count: 16

    Hi Ed,

    I appreciate your responsiveness on this. Thank you.

    The issue that we’re experiencing is that when we submit the offer we’re getting the following error back in the JSON response, which then makes it a bad response.

    <b>Fatal error</b>: Call to a member function get_formatted_name() on a non-object in <b>/home/angelley
    /sandbox_woocommerce/wp-content/plugins/offers-for-woocommerce/public/class-offers-for-woocommerce.php
    </b> on line <b>955</b><br />

    When we trace that back what it comes down to is that the values we’re loading with get_post_meta() are empty, but it only happens with this theme. I guess you’re getting something different?

    As for the error you’ve now mentioned here, can you tell me exactly where you’re seeing that? That’s another one I haven’t seen myself. Is submitting the offer what generates the error you mentioned? That would different than what we’re seeing on multiple setups, which is what I explained above.

    Thanks again for your help with this. Really want to get this working so our stuff can work nicely along-side yours. ๐Ÿ™‚

    #192193
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    That is the exact same issue I’m getting here, only on Twenty 15 – https://www.dropbox.com/s/ph6mzyuiavt65ri/Screenshot%202015-07-06%2023.51.17.png?dl=0

    EDIT: On both Atelier & Twenty 15.

    – Ed

    #192444
    AntRubano1
    Member
    Post count: 16

    Thank you so much for your time. I think we got it figured out here. I was able to make some adjustments and now offers are submitting as expected with the Atelier theme. ๐Ÿ™‚

    #192562
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    That’s great. Thanks Ed.
    -Rui

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register