Hello! Thanks for the awesome plugin! One issue I'm having is that books with future published dates don't show the "Available on" label on their book pages. I think I've tracked down the issues, but I'd prefer not to change my local files so I can still update. And I'm no expert, so my changes might break something else. :)
I think it's two issues. The first: In class-mbm-book-basic.php, line 129, a book with a future date will never return true for is_published, meaning the date will never show because line 2359 of class-mbm-book-cpt.php checks is_published before adding the book_published shortcode.
Issue two is with the book_published shortcode itself. On line 1612 of class-mbm-book-cpt.php in the shortcode_published function, I believe $this->data_object->release_date needs to be wrapped in strtotime() to correctly compare against strtotime('now').
You should be able to easily test/reproduce the issue by setting a future published date for a book and then checking the book page to see if the "Available on:" label is showing up. Please let me know if you have any questions!
Thank you for your stellar debugging! You are right on both counts. I have no idea how this bug went unnoticed for so long, but I'm pushing the update out now!
Hello! Thanks for the awesome plugin! One issue I'm having is that books with future published dates don't show the "Available on" label on their book pages. I think I've tracked down the issues, but I'd prefer not to change my local files so I can still update. And I'm no expert, so my changes might break something else. :)
I think it's two issues. The first: In class-mbm-book-basic.php, line 129, a book with a future date will never return true for is_published, meaning the date will never show because line 2359 of class-mbm-book-cpt.php checks is_published before adding the book_published shortcode.
Issue two is with the book_published shortcode itself. On line 1612 of class-mbm-book-cpt.php in the shortcode_published function, I believe $this->data_object->release_date needs to be wrapped in strtotime() to correctly compare against strtotime('now').
You should be able to easily test/reproduce the issue by setting a future published date for a book and then checking the book page to see if the "Available on:" label is showing up. Please let me know if you have any questions!