Home Forums WC Vendors Free Support woocommerce_wp_text_input issue

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2432
    svenl77
    Participant

    Hi,

    you are using woocommerce_wp_text_input function and add a second argument to the function call. Other plugins also make use of the woocommerce_wp_text_input function in the front-end.

    This creates an issue for all other uses of the woocommerce_wp_text_input function:

    Warning: Missing argument 2 for woocommerce_wp_text_input()…

    Notice: Undefined variable: thepostid in…

    Your second function call is for the $thepostid. The $thepostid is a global and you do not need to add it as attribute to your function call. Just use it as global.

    If you want to add extra attributes to the function, best would be to change the function name to avoid the this issues.

    #2433
    svenl77
    Participant

    why not use the WooCommerce file?

    if(!function_exists(‘woocommerce_wp_text_input’) && !is_admin())
    include_once(WC()->plugin_path() . ‘/includes/admin/wc-meta-box-functions.php’);

    #2440
    WC Vendors Support
    Participant

    This is the way it was written by Matt, the original plugin developer that was sold before it became WC Vendors Free. We haven’t really had any reason to go in and change all of this yet. But, I’ll add it as a GitHub issue for inspection. Thanks for the heads up.

    https://github.com/wcvendors/wcvendors/issues/74

    Ben

    #2443
    svenl77
    Participant

    Hi,

    thanks for your fast replay, I have created a pull request. Hope it helps. I did some testing and so fare I thing it does the job.

    https://github.com/wcvendors/wcvendors/pull/75

    #2445
    WC Vendors Support
    Participant

    Thanks Svenl77, much appreciated. I’ll have Jamie review the pull request, and if it’s solid, it’ll be in the next update of WC Vendors.

    Feel free to submit any pulls you like via GitHub for other things, it’s the fastest and easiest way for us to keep up with things.

    Regards,

    Ben

    #2466
    Jamie
    Keymaster

    This has been reviewed, integrated and released in 1.4.0 as of today.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.