Hello OP,
were you able to solve the issue?
@ihereira I have the exact same issue (see the screenshot the OP linked above) since several weeks. I tried upgrading everything to the latest versions and and I also set up a staging site and changed my theme to storefront. But the bug still persists. This is really becoming a problem because I’m not able to check some numbers from last year because I’m unable to select a custom date range. Please look into it.
Thanks,
Lisa
Thread Starter
Chupsi
(@chupsi)
The problem seemed to be the class name.
This code works now:
function create_custom_product_type() {
class WC_Product_Books_Product extends WC_Product {
public function __construct( $product ) {
$this->product_type = 'books_product';
parent::__construct( $product );
}
}
}
add_action( 'init', 'create_custom_product_type' );