- This topic has 3 replies, 3 voices, and was last updated 7 years, 9 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
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
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;
}
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?
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.
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.