Change Stock button not hiden

product-info.js

  this.productForm?.toggleSubmitButton(
            html.getElementById(`ProductSubmitButton-${this.sectionId}`)?.hasAttribute('disabled') ?? true,
            window.variantStrings.soldOut
          );
//after   this.productForm?.toggleSubmitButton( 
          if (this.productForm) {
            const isDisabled = html.getElementById(`ProductSubmitButton-${this.sectionId}`)?.hasAttribute('disabled');
            this.productForm.classList.toggle('out-of-stock', !!isDisabled);
            this.productForm.classList.toggle('in-stock', !isDisabled);
          }
style 
 .product-form button:disabled {
    opacity: 1;
    } 
.out-of-stock button {
    opacity: 0.5 !important;
} 

Leave a Reply

Your email address will not be published. Required fields are marked *