JavaScript error with post types that don’t support titles
-
Hey there! (Salut Québec!)
Great plugin, obviously. I’m having a small issue with it though. Your JavaScript is enqueued on all post edit screens. It also starts straight away by grabbing the value of the post title’s form input and performing string operations on it. Unfortunately, this causes JavaScript errors if the title input is not present, which _can_ happen, as titles are optional for posts.
Here’s my suggested fix:
global $post; if ( 'post.php' != $hook || 'product' != get_post_type( $post ) ) {
Use it to replace line 358 in wc-product-customer-list.php. Cheers!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘JavaScript error with post types that don’t support titles’ is closed to new replies.