It was observed that buy Now button was causing various off and on issues related to product page; some product pages were not loading fine while others were. We have fond its fix; here it is, for your review:
/wp-content/themes/woodmart/inc/modules/quick-buy/class-main.php
FIND:
if ( woodmart_get_opt( 'buy_now_enabled' ) ) {
Quick_Buy::get_instance()->output_quick_buy_button();
}
REPLACE:
if ( woodmart_get_opt( 'buy_now_enabled' ) ) {
if ( class_exists( '\XTS\Modules\Quick_Buy\Main' ) ) {
$quick_buy_class = '\XTS\Modules\Quick_Buy\Main';
// Try any available instance method
if ( method_exists( $quick_buy_class, 'get_instance' ) ) {
$quick_buy = $quick_buy_class::get_instance();
} elseif ( method_exists( $quick_buy_class, 'get_main_instance' ) ) {
$quick_buy = $quick_buy_class::get_main_instance();
} elseif ( method_exists( $quick_buy_class, 'instance' ) ) {
$quick_buy = $quick_buy_class::instance();
} else {
$quick_buy = null;
}
// If valid instance and callable
if ( $quick_buy && method_exists( $quick_buy, 'output_quick_buy_button' ) ) {
$quick_buy->output_quick_buy_button();
}
}
}
This is an adhoc bugfix, i am sure authors will be able to do it in a quicker manner and more optimized one