Skip to content

Commit b6b1f6c

Browse files
authored
Merge pull request #197 from TycheSoftwares/revert-182-custom_development
Revert "Custom work"
2 parents 2b7e76c + 04db675 commit b6b1f6c

File tree

6 files changed

+6
-553
lines changed

6 files changed

+6
-553
lines changed

woocommerce-delivery-notes/includes/class-wcdn-print.php

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,6 @@ public function __construct() {
169169
'type' => 'default',
170170
'path' => WooCommerce_Delivery_Notes::$plugin_path . 'templates/print-order/',
171171
'url' => WooCommerce_Delivery_Notes::$plugin_url . 'templates/print-order/',
172-
),
173-
array(
174-
'name' => __( 'Custom template', 'woocommerce-delivery-notes' ),
175-
'type' => 'new_template',
176-
'path' => WooCommerce_Delivery_Notes::$plugin_path . 'templates/new-template/',
177-
'url' => WooCommerce_Delivery_Notes::$plugin_url . 'templates/new-template/',
178172
)
179173
);
180174

@@ -321,17 +315,10 @@ public function parse_request( $wp ) {
321315
* Build the template locations
322316
*/
323317
public function build_template_locations() {
318+
$wc_template_directory = WC_TEMPLATE_PATH . 'print-order/';
319+
324320
// Get the paths for custom styles.
325-
$settings_type = get_option( 'wcdn_template_style', '' );
326-
if ( 'default' === $settings_type || '' === $settings_type ) {
327-
$wc_template_directory = WC_TEMPLATE_PATH . 'print-order/';
328-
$plugin_path = self::$template_styles[0]['path'];
329-
$plugin_url = self::$template_styles[0]['url'];
330-
} elseif ( 'new_template' === $settings_type ) {
331-
$wc_template_directory = WC_TEMPLATE_PATH . 'new-template/';
332-
$plugin_path = self::$template_styles[1]['path'];
333-
$plugin_url = self::$template_styles[1]['url'];
334-
}
321+
$settings_type = get_option( 'wcdn_template_style' );
335322
$settings_path = null;
336323
$settings_url = null;
337324
if ( isset( $settings_type ) && 'default' !== $settings_type ) {
@@ -362,10 +349,11 @@ public function build_template_locations() {
362349
),
363350

364351
'plugin' => array(
365-
'path' => $plugin_path,
366-
'url' => $plugin_url,
352+
'path' => self::$template_styles[0]['path'],
353+
'url' => self::$template_styles[0]['url'],
367354
),
368355
);
356+
369357
return $locations;
370358
}
371359

woocommerce-delivery-notes/templates/new-template/print-content.php

Lines changed: 0 additions & 224 deletions
This file was deleted.

woocommerce-delivery-notes/templates/new-template/print-footer.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

woocommerce-delivery-notes/templates/new-template/print-header.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

woocommerce-delivery-notes/templates/new-template/print-order.php

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)