| @@ -506,9 +506,9 @@ | ||
| 506 | 506 | |
| 507 | 507 | wp_enqueue_script( |
| 508 | 508 | 'wcpos-template-editor', |
| 509 | 509 | PLUGIN_URL . $dir . '/js/template-editor.js', |
| 510 | - array( 'react', 'react-dom', 'wp-api-fetch' ), | |
| 510 | + array( 'react', 'react-dom', 'wp-api-fetch', \WCPOS\WooCommercePOS\Admin::API_FETCH_METHOD_PARAM_HANDLE ), | |
| 511 | 511 | PLUGIN_VERSION, |
| 512 | 512 | true |
| 513 | 513 | ); |
| 514 | 514 | |
| @@ -551,9 +551,9 @@ | ||
| 551 | 551 | |
| 552 | 552 | // Get sample receipt data from the preview builder. |
| 553 | 553 | $sample_data = self::get_sample_receipt_data(); |
| 554 | 554 | |
| 555 | - $preview_url = rest_url( 'wcpos/v1/templates/' . $post->ID . '/preview' ); | |
| 555 | + $preview_url = rest_url( 'wcpos/v2/templates/' . $post->ID . '/preview' ); | |
| 556 | 556 | |
| 557 | 557 | $paper_width = get_post_meta( $post->ID, '_template_paper_width', true ); |
| 558 | 558 | |
| 559 | 559 | $config = array( |