Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore_wrong_product_id_error_msg to only return output if 'Enable Debug' is ON

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore_wrong_product_id_error_msg to only return output if 'Enable Debug' is ON

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 4 months ago by admin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 28, 2016 at 1:50 pm #13555
    cassio
    Member

    In my opinion eStore_wrong_product_id_error_msg should only return output if DEBUG is enabled. Updated function below.

    function eStore_wrong_product_id_error_msg($id) {

    if( get_option('eStore_cart_enable_debug') ) {

    return "<div style='color:red;'>Looks like you have entered a product ID (" . $id . ") that doesn't exist in the product database. Please check your product ID value again!</div>
    ";

    }

    return;

    }

    June 28, 2016 at 2:46 pm #73550
    wzp
    Moderator

    And if DEBUG is turned off, and a non-existing ID is entered; what should happen, besides keeping the user guessing about why nothing is happening?

    June 28, 2016 at 3:25 pm #73551
    cassio
    Member

    That is a valid point.

    I suppose there could be different responses depending on where the error is generated. I was only thinking of the purchase button in a product listing.

    June 29, 2016 at 3:08 am #73552
    admin
    Keymaster

    You MUST enter a valid product ID with a shortcode that requires one. If you don’t enter a valid product ID, it must produce the error so the user quickly knows what has happened and can correct it.

    Otherwise, whatever you are thinking is wrong. If you elaborate your reasoning for wanting it, I will explain more.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2026 | Tips and Tricks HQ