Saving Product Bug
-
This is something you’ll see if debug mode is on. When saving a product without a custom field a warning notice appears about the invalid index “asp_product_custom_field”. The notice prevents the page from showing, even though everything worked with saving the changes.
Here’s the fix, change line 153 in the main file – accept-stripe-payments.php – to:
if (!empty($_POST[‘asp_product_custom_field’]))
update_post_meta($post_id, ‘asp_product_custom_field’, sanitize_text_field($_POST[‘asp_product_custom_field’]));
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Saving Product Bug’ is closed to new replies.