How to change inside curly brackets
I want to make a different order preview button on the page where the orders are listed and customize the modal.
public function order_preview_template() {
?>
<script type="text/template" id="tmpl-wc-modal-view-order">
<div class="wc-backbone-modal wc-order-preview">
<div class="wc-backbone-modal-content">
<section class="wc-backbone-modal-main" role="main">
<header class="wc-backbone-modal-header">
<mark class="order-status status-"><span></span></mark>
<?php /* translators: %s: order ID */ ?>
<h1><?php echo esc_html( sprintf( __( 'Order #%s', 'woocommerce' ), '' ) ); ?></h1>
<button class="modal-close modal-close-link dashicons dashicons-no-alt">
<span class="screen-reader-text"><?php esc_html_e( 'Close modal panel', 'woocommerce' ); ?></span>
</button>
</header>
<article>
<?php do_action( 'woocommerce_admin_order_preview_start' ); ?>
How do the values returned from the ajax process in the above code change the value?
if (response.success) {
$(this).WCBackboneModal({
template: 'wc-modal-view-order',
variable: response.data,
});
}
When I change the template name from anywhere, when I do the example wc-modal-view-order to wc-modal-view-korkmaz, it works like the picture below and the data does not change.
source https://stackoverflow.com/questions/73964567/wocommerce-order-preview-template-how-to-change

No comments:
Post a Comment