Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter alexviar

    (@alexviar)

    It seems like the check for null products is absent in the file swatches.php. Should it be there?

    public function variation_attribute_html_shop_page() {
    global $product;
    if ( ! $this->settings[ CFVSW_GLOBAL ]['enable_swatches_shop'] ) {
    return;
    }

    if ( ! $this->requires_shop_settings() ) {
    return;
    }

    // Check for null products
    if ( ! $product ) {
    return;
    }

    if ( ! $product->is_type( 'variable' ) ) {
    return;
    }

    if ( ! $product->get_available_variations() ) {
    return;
    }
    • This reply was modified 8 months, 1 week ago by alexviar.
Viewing 1 replies (of 1 total)