@@ -649,7 +649,7 @@ public function generate_qr_code( $order_id ) {
649649 $ show_qr_download = ( wp_is_mobile () && $ this ->download_qr === 'yes ' );
650650
651651 $ qr_code_class = ( $ hide_mobile_qr ) ? 'upiwc-hide ' : 'upiwc-show ' ;
652- //$show_intent_btn = $show_qr_download = true ;
652+ $ form_class = ( $ this -> transaction_id !== ' hide ' || $ this -> transaction_image !== ' hide ' ) ? ' upiwc-payment-confirm-form-container ' : ' upiwc-payment-confirm-form-container upiwc-hidden ' ;
653653
654654 // add html output on payment endpoint
655655 if ( 'yes ' === $ this ->enabled && $ order ->needs_payment () === true && $ order ->has_status ( $ this ->default_status ) && ! empty ( $ payee_vpa ) ) { ?>
@@ -744,35 +744,33 @@ public function generate_qr_code( $order_id ) {
744744 <?php } ?>
745745 </div>
746746 <div class="upiwc-payment-confirm" style="display: none;">
747- <?php if ( $ this ->transaction_id !== 'hide ' || $ this ->transaction_image !== 'hide ' ) { ?>
748- <div class="upiwc-payment-confirm-form-container">
749- <form id="upiwc-payment-confirm-form" class="upiwc-payment-confirm-form">
750- <?php if ( $ this ->transaction_id !== 'hide ' ) { ?>
751- <div class="upiwc-form-row">
752- <label for="upiwc-payment-transaction-number">
753- <strong><?php esc_html_e ( 'Enter 12-digit Transaction / UTR / Reference ID: ' , 'upi-qr-code-payment-for-woocommerce ' ); ?> </strong>
754- <?php if ( $ this ->transaction_id === 'show_require ' ) { ?>
755- <span class="field-required">*</span>
756- <?php } ?>
757- </label>
758- <input type="text" id="upiwc-payment-transaction-number" name="upiwc_transaction_id" maxlength="12" onkeypress="return upiwcIsNumber(event)" />
759- </div>
760- <?php } ?>
761- <?php if ( $ this ->transaction_image !== 'hide ' ) { ?>
762- <div class="upiwc-form-row">
763- <label for="upiwc-payment-file">
764- <strong><?php esc_html_e ( 'Upload Screenshot: ' , 'upi-qr-code-payment-for-woocommerce ' ); ?> </strong>
765- <?php if ( $ this ->transaction_image === 'show_require ' ) { ?>
766- <span class="field-required">*</span>
767- <?php } ?>
768- </label>
769- <input type="file" id="upiwc-payment-file" name="upiwc_file" accept=".jpg, .jpeg, .png," />
770- </div>
771- <?php } ?>
772- </form>
773- <div class="upiwc-payment-error" style="display: none;"></div>
774- </div>
775- <?php } ?>
747+ <div class="<?php echo esc_attr ( $ form_class ); ?> ">
748+ <form id="upiwc-payment-confirm-form" class="upiwc-payment-confirm-form">
749+ <?php if ( $ this ->transaction_id !== 'hide ' ) { ?>
750+ <div class="upiwc-form-row">
751+ <label for="upiwc-payment-transaction-number">
752+ <strong><?php esc_html_e ( 'Enter 12-digit Transaction / UTR / Reference ID: ' , 'upi-qr-code-payment-for-woocommerce ' ); ?> </strong>
753+ <?php if ( $ this ->transaction_id === 'show_require ' ) { ?>
754+ <span class="field-required">*</span>
755+ <?php } ?>
756+ </label>
757+ <input type="text" id="upiwc-payment-transaction-number" name="upiwc_transaction_id" maxlength="12" onkeypress="return upiwcIsNumber(event)" />
758+ </div>
759+ <?php } ?>
760+ <?php if ( $ this ->transaction_image !== 'hide ' ) { ?>
761+ <div class="upiwc-form-row">
762+ <label for="upiwc-payment-file">
763+ <strong><?php esc_html_e ( 'Upload Screenshot: ' , 'upi-qr-code-payment-for-woocommerce ' ); ?> </strong>
764+ <?php if ( $ this ->transaction_image === 'show_require ' ) { ?>
765+ <span class="field-required">*</span>
766+ <?php } ?>
767+ </label>
768+ <input type="file" id="upiwc-payment-file" name="upiwc_file" accept=".jpg, .jpeg, .png," />
769+ </div>
770+ <?php } ?>
771+ </form>
772+ <div class="upiwc-payment-error" style="display: none;"></div>
773+ </div>
776774 <div class="upiwc-payment-confirm-text"><?php echo $ this ->confirm_message ; ?> </div>
777775 </div>
778776 </div>
0 commit comments