| 1 |
<?php if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?> |
| 2 |
|
| 3 |
<!DOCTYPE html> |
| 4 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 |
<head> |
| 6 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 7 |
<?php |
| 8 |
wp_enqueue_script( |
| 9 |
'wcpostnl-export', |
| 10 |
WooCommerce_PostNL()->plugin_url() . '/assets/js/wcmp-admin.js', |
| 11 |
array( 'jquery', 'thickbox' ), |
| 12 |
WC_POSTNL_VERSION |
| 13 |
); |
| 14 |
wp_localize_script( |
| 15 |
'wcpostnl-export', |
| 16 |
'wc_postnl', |
| 17 |
array( |
| 18 |
'ajax_url' => admin_url('admin-ajax.php'), |
| 19 |
'nonce' => wp_create_nonce('wc_postnl'), |
| 20 |
'download_display' => isset(WooCommerce_PostNL()->general_settings['download_display']) |
| 21 |
? WooCommerce_PostNL()->general_settings['download_display'] |
| 22 |
: '', |
| 23 |
) |
| 24 |
); |
| 25 |
|
| 26 |
wp_enqueue_style( |
| 27 |
'wcmp-admin-styles', |
| 28 |
WooCommerce_PostNL()->plugin_url() . '/assets/css/wcmp-admin-styles.css', |
| 29 |
array(), |
| 30 |
WC_POSTNL_VERSION, |
| 31 |
'all' |
| 32 |
); |
| 33 |
|
| 34 |
// Legacy styles (WC 2.1+ introduced MP6 style with larger buttons) |
| 35 |
if ( version_compare( WOOCOMMERCE_VERSION, '2.1', '<=' ) ) { |
| 36 |
wp_enqueue_style( |
| 37 |
'wcmp-admin-styles-legacy', |
| 38 |
WooCommerce_PostNL()->plugin_url() . '/assets/css/wcmp-admin-styles-legacy.css', |
| 39 |
array(), |
| 40 |
WC_POSTNL_VERSION, |
| 41 |
'all' |
| 42 |
); |
| 43 |
} |
| 44 |
|
| 45 |
wp_enqueue_style( 'wcpostnl-admin-styles' ); |
| 46 |
wp_enqueue_style( 'colors' ); |
| 47 |
wp_enqueue_style( 'media' ); |
| 48 |
wp_enqueue_script( 'jquery' ); |
| 49 |
do_action('admin_print_styles'); |
| 50 |
do_action('admin_print_scripts'); |
| 51 |
?> |
| 52 |
</head> |
| 53 |
<body style="padding:10px 20px;"> |
| 54 |
<?php |
| 55 |
switch($request) { |
| 56 |
case 'add_return': |
| 57 |
printf('<h3>%s</h3>', __('Return email successfully sent to customer')); |
| 58 |
break; |
| 59 |
default: |
| 60 |
# code... |
| 61 |
break; |
| 62 |
} |
| 63 |
?> |
| 64 |
</body></html> |