Send Quotes on Multiple Order Statuses
-
Hello I was wondering how to add another order status like ‘processing’, ‘invoice’ , ‘on-hold’ to have the ability to send quotes like in this code below:
/** * Add buttons in Edit Order page to allow the admin * to setup quotes and send them to the users. * * @param object $order - WC_Order. * @since 1.0 */ public function qwc_add_buttons( $order ) { $order_id = ( version_compare( WOOCOMMERCE_VERSION, '3.0.0' ) < 0 ) ? $order->id : $order->get_id(); $order_status = ( version_compare( WOOCOMMERCE_VERSION, '3.0.0' ) < 0 ) ? $order->status : $order->get_status(); $quote_status = get_post_meta( $order_id, '_quote_status', true ); if ( 'pending' === $order_status ) { if ( 'quote-pending' === $quote_status ) { ?> <button id='qwc_quote_complete' type="button" class="button"><?php esc_html_e( 'Quote Complete', 'quote-wc' ); ?></button> <?php } else { if ( 'quote-complete' === $quote_status ) { $button_text = esc_html__( 'Send Quote', 'quote-wc' ); } elseif ( 'quote-sent' === $quote_status ) { $button_text = esc_html__( 'Resend Quote', 'quote-wc' ); } ?> <button id='qwc_send_quote' type="button" class="button"><?php echo esc_html( $button_text ); ?></button> <text style='margin-left:0px;' type='hidden' id='qwc_msg'></text> <?php } } }
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Send Quotes on Multiple Order Statuses’ is closed to new replies.