From 3a4a821e90ae2365ac1a8ef85a72096c74952081 Mon Sep 17 00:00:00 2001 From: Pranta Date: Wed, 7 Apr 2021 18:22:06 +0600 Subject: [PATCH 1/4] change update button --- includes/Admin/Admin.php | 20 +++++++++++-------- includes/Frontend/Frontend.php | 36 ++++++++++++++++++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/includes/Admin/Admin.php b/includes/Admin/Admin.php index 9052196..4ba97d1 100644 --- a/includes/Admin/Admin.php +++ b/includes/Admin/Admin.php @@ -82,14 +82,18 @@ public function get_settings() { 'desc' => __( 'This will replace woocommerce variation button text value ', 'wc-advance-tweaks' ), 'id' => 'wc_advance_tweaks_variation_button' ), + 'update-cart-button-text' => array( + 'name' => __( 'Update cart button text', 'wc-advance-tweaks' ), + 'type' => 'textarea', + 'desc' => __( 'This will replace woocommerce update cart button in cart page text value', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_update_cart_button' + ), 'redirect-to' => array( - 'name' => __( 'Select Pages', 'wc-advance-tweaks' ), - 'type' => 'select', - 'desc' => __( 'Select preffered pages to show ', 'wc-advance-tweaks' ), - 'id' => 'wc_advance_tweaks_redirect_button', + 'name' => __( 'Redirect on clicking add to cart', 'wc-advance-tweaks' ), + 'type' => 'select', + 'desc' => __( 'Select preffered page to redirect while customer click add to cart button', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_redirect_button', 'options' => $this->get_pages(), - - ), 'empty-cart-button-check' => array( 'name' => __( 'Empty Cart Button', 'wc-advance-tweaks' ), @@ -98,8 +102,8 @@ public function get_settings() { 'id' => 'wc_advance_tweaks_empty_button_checkbox' ), 'section_end' => array( - 'type' => 'sectionend', - 'id' => 'wc-advance-tweaks_section_end' + 'type' => 'sectionend', + 'id' => 'wc-advance-tweaks_section_end' ) ); return apply_filters( 'wc_settings_tab_demo_setting', $settings ); diff --git a/includes/Frontend/Frontend.php b/includes/Frontend/Frontend.php index 028ab81..33281ee 100644 --- a/includes/Frontend/Frontend.php +++ b/includes/Frontend/Frontend.php @@ -26,9 +26,13 @@ class Frontend { public function __construct() { add_filter( 'woocommerce_product_single_add_to_cart_text', [ $this, 'change_add_to_cart_single' ] ); add_filter( 'woocommerce_product_add_to_cart_text', [ $this, 'change_add_to_cart_shop' ] ); + add_filter( 'gettext', [ $this, 'change_update_cart_text' ], 20, 3 ); add_action( 'woocommerce_cart_coupon', [ $this, 'custom_woocommerce_empty_cart_button' ] ); add_action( 'init', [ $this, 'custom_woocommerce_empty_cart_action' ] ); + //add_filter( 'woocommerce_is_sold_individually', [ $this, 'wc_remove_quantity_field_from_cart' ], 10, 2 ); add_filter( 'woocommerce_add_to_cart_redirect', [ $this, 'wc_get_cart_url' ], 99 ); + add_filter('woocommerce_cart_item_quantity', [ $this, 'wc_hide_quantity' ], 12, 3 ); + } /** @@ -41,7 +45,7 @@ public function change_add_to_cart_single() { /** * update add to cart button for shop page - */ + */ public function change_add_to_cart_shop() { global $product; $add_to_cart= get_option( 'wc_advance_tweaks_add_to_cart_button' ); @@ -55,6 +59,16 @@ public function change_add_to_cart_shop() { } } + /** + * update cart on cart button change text + */ + public function change_update_cart_text( $translated, $text, $domain ) { + if( is_cart() && $translated == 'Update cart' ){ + $translated = get_option( 'wc_advance_tweaks_update_cart_button' ); + } + return $translated; + } + /** * create empty cart button */ @@ -76,13 +90,23 @@ public function custom_woocommerce_empty_cart_action() { } } + /** + * add to cart redirect function + */ public function wc_get_cart_url( $url ) { return get_permalink(get_option( 'wc_advance_tweaks_redirect_button') ); + } + + /** + * remove quantity option while checked + */ + public function wc_remove_quantity_field_from_cart( $return, $product ) { + if ( is_cart() ) { + return true; + } + } - //$page_id = - //var_dump(get_option( 'wc_advance_tweaks_redirect_button' )); - //var_dump(get_permalink(get_option( 'wc_advance_tweaks_redirect_button') )); - //return $page_url; - //var_dump($page_url); + public function wc_hide_quantity( $product_quantity, $cart_item_key, $cart_item ) { + return $cart_item['quantity']; } } \ No newline at end of file From 74b9a85054aaeb92fa93078d104e66ec2dceb47a Mon Sep 17 00:00:00 2001 From: Pranta Date: Fri, 9 Apr 2021 19:23:40 +0600 Subject: [PATCH 2/4] added coupon field & some modifications --- includes/Admin/Admin.php | 39 ++++++++++++++++++++++++++++++++++ includes/Frontend/Frontend.php | 33 ++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/includes/Admin/Admin.php b/includes/Admin/Admin.php index 4ba97d1..6f919ee 100644 --- a/includes/Admin/Admin.php +++ b/includes/Admin/Admin.php @@ -11,6 +11,8 @@ namespace ChiliDevs\WCAdvanceTweaks\Admin; +use WC_Coupon; + /** * Admin class. * @@ -48,6 +50,9 @@ public function add_settings_tab() { woocommerce_admin_fields( $this-> get_settings() ); } + /** + * get all the page title + */ public function get_pages() { $pages = get_pages(); $pages_options = array(); @@ -59,6 +64,26 @@ public function get_pages() { return $pages_options; } + /** + * get all the coupon title + */ + public function get_coupon() { + $args = array( + 'posts_per_page' => -1, + 'orderby' => 'title', + 'order' => 'asc', + 'post_type' => 'shop_coupon', + 'post_status' => 'publish', + ); + $coupons = get_posts( $args ); + $coupon_names = array(); + foreach ( $coupons as $coupon ) { + $coupon = new WC_Coupon( $coupon->ID ); + $coupon_name[$coupon->get_id()] = $coupon->get_code(); + } + return $coupon_name; + } + /** * Add custom fields */ @@ -101,6 +126,20 @@ public function get_settings() { 'desc' => __( 'Check this box to show empty cart button', 'wc-advance-tweaks' ), 'id' => 'wc_advance_tweaks_empty_button_checkbox' ), + 'hide-quantity-in-cart-check' => array( + 'name' => __( 'Hide quantity field in cart', 'wc-advance-tweaks' ), + 'type' => 'checkbox', + 'desc' => __( 'Check this box to disallow changing quantity in cart page', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_hide_quantity_checkbox' + ), + 'coupon-show' => array( + 'name' => __( 'Choose coupons to offer', 'wc-advance-tweaks' ), + 'type' => 'multiselect', + 'desc' => __( 'Select the coupons for customers to show', 'wc-advance-tweaks' ), + 'class' => 'wc-enhanced-select', + 'id' => 'wc_advance_tweaks_coupon_select_field', + 'options' => $this->get_coupon(), + ), 'section_end' => array( 'type' => 'sectionend', 'id' => 'wc-advance-tweaks_section_end' diff --git a/includes/Frontend/Frontend.php b/includes/Frontend/Frontend.php index 33281ee..85b3379 100644 --- a/includes/Frontend/Frontend.php +++ b/includes/Frontend/Frontend.php @@ -11,6 +11,8 @@ namespace ChiliDevs\WCAdvanceTweaks\Frontend; +use WC_Coupon; + /** * Frontend class. * @@ -29,9 +31,9 @@ public function __construct() { add_filter( 'gettext', [ $this, 'change_update_cart_text' ], 20, 3 ); add_action( 'woocommerce_cart_coupon', [ $this, 'custom_woocommerce_empty_cart_button' ] ); add_action( 'init', [ $this, 'custom_woocommerce_empty_cart_action' ] ); - //add_filter( 'woocommerce_is_sold_individually', [ $this, 'wc_remove_quantity_field_from_cart' ], 10, 2 ); add_filter( 'woocommerce_add_to_cart_redirect', [ $this, 'wc_get_cart_url' ], 99 ); - add_filter('woocommerce_cart_item_quantity', [ $this, 'wc_hide_quantity' ], 12, 3 ); + add_filter( 'woocommerce_cart_item_quantity', [ $this, 'wc_hide_quantity' ], 12, 3 ); + add_action( 'woocommerce_cart_collaterals', [ $this, 'woocommerce_coupon_show_field' ] ); } @@ -100,13 +102,30 @@ public function wc_get_cart_url( $url ) { /** * remove quantity option while checked */ - public function wc_remove_quantity_field_from_cart( $return, $product ) { - if ( is_cart() ) { - return true; + public function wc_hide_quantity( $product_quantity, $cart_item_key, $cart_item ) { + $hide = get_option( 'wc_advance_tweaks_hide_quantity_checkbox' ); + if ( $hide === 'yes' ) { + return $cart_item['quantity']; } + return $product_quantity; } - public function wc_hide_quantity( $product_quantity, $cart_item_key, $cart_item ) { - return $cart_item['quantity']; + /** + * dislay available coupon detail on cart page + */ + public function woocommerce_coupon_show_field() { + $coupons = get_option( 'wc_advance_tweaks_coupon_select_field' ); + echo '
'; + echo "" . 'You can use the following discount codes on your cart' . ""; + foreach ( $coupons as $coupon ) { + $coupon = new WC_Coupon( $coupon ); + ?> +
+

" . $coupon->get_code() . ""; ?>

+

get_amount(); ?>

+

get_description(); ?>

+
+ Date: Mon, 12 Apr 2021 20:46:09 +0600 Subject: [PATCH 3/4] my-account menu hide option --- includes/Admin/Admin.php | 46 ++++++++++++++++++++++++++++++++-- includes/Frontend/Frontend.php | 12 +++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/includes/Admin/Admin.php b/includes/Admin/Admin.php index 6f919ee..96e8d5b 100644 --- a/includes/Admin/Admin.php +++ b/includes/Admin/Admin.php @@ -29,6 +29,8 @@ public function __construct() { add_filter( 'woocommerce_settings_tabs_array', [ $this, 'add_tweak_tab' ], 50 ); add_action( 'woocommerce_settings_tabs_tweak_tab', [ $this, 'add_settings_tab' ] ); add_action( 'woocommerce_update_options_tweak_tab', [ $this, 'update_tweak_settings' ] ); + add_filter( 'woocommerce_get_sections_products' , [ $this, 'add_custom_sub_menu' ] ); + add_filter( 'woocommerce_get_settings_products' , [ $this, 'my_account_submenu_hide' ], 10, 2 ); } /** @@ -47,7 +49,7 @@ public function add_tweak_tab ( $settings_tabs ) { * Add fields on custum tab */ public function add_settings_tab() { - woocommerce_admin_fields( $this-> get_settings() ); + woocommerce_admin_fields( $this->get_settings() ); } /** @@ -93,7 +95,7 @@ public function get_settings() { 'name' => __( 'Advanced Tweaks', 'wc-advance-tweaks' ), 'type' => 'title', 'desc' => '', - 'id' => 'wc-advance-tweaks_section_title' + 'id' => 'wc_advance_tweaks_section_title' ), 'add-to-cart-button-text' => array( 'name' => __( 'Add to cart button text', 'wc-advance-tweaks' ), @@ -154,4 +156,44 @@ public function get_settings() { public function update_tweak_settings () { woocommerce_update_options( $this->get_settings() ); } + + /** + * add new submenu + */ + public function add_custom_sub_menu ( $settings_tab ) { + $settings_tab['new_submenu'] = __( 'MiscTweaks', 'wc-advance-tweaks'); + return $settings_tab; + } + + /** + * add settings to submenu + */ + public function my_account_submenu_hide( $settings, $current_section ) { + $custom_settings = array(); + if( 'new_submenu' == $current_section ) { + $custom_settings = array( + 'section_title' => array( + 'name' => __( 'MiscTweaks', 'wc-advance-tweaks' ), + 'type' => 'title', + 'desc' => '', + 'id' => 'wc_advance_tweaks_my_account_menu' + ), + 'my-account-show-menu' => array( + 'name' => __( 'Choose menu to hide', 'wc-advance-tweaks' ), + 'type' => 'multiselect', + 'desc' => __( 'Select the menus for customers to hide', 'wc-advance-tweaks' ), + 'class' => 'wc-enhanced-select', + 'id' => 'wc_advance_tweaks_coupon_select_field', + 'options' => wc_get_account_menu_items(), + ), + 'section_end' => array( + 'type' => 'sectionend', + 'id' => 'wc-advance-tweaks_section_endd' + ) + ); + return $custom_settings; + } else { + return $settings; + } + } } diff --git a/includes/Frontend/Frontend.php b/includes/Frontend/Frontend.php index 85b3379..7b2876b 100644 --- a/includes/Frontend/Frontend.php +++ b/includes/Frontend/Frontend.php @@ -34,6 +34,7 @@ public function __construct() { add_filter( 'woocommerce_add_to_cart_redirect', [ $this, 'wc_get_cart_url' ], 99 ); add_filter( 'woocommerce_cart_item_quantity', [ $this, 'wc_hide_quantity' ], 12, 3 ); add_action( 'woocommerce_cart_collaterals', [ $this, 'woocommerce_coupon_show_field' ] ); + add_action( 'woocommerce_account_menu_items', [ $this, 'woocommerce_my_account_menu' ], 10, 2 ); } @@ -128,4 +129,15 @@ public function woocommerce_coupon_show_field() { Date: Wed, 21 Apr 2021 12:48:27 +0600 Subject: [PATCH 4/4] added a few my account and thank you page features --- includes/Admin/Admin.php | 94 ++++++++++++++++++++++++++++++++-- includes/Frontend/Frontend.php | 76 ++++++++++++++++++++++++--- 2 files changed, 160 insertions(+), 10 deletions(-) diff --git a/includes/Admin/Admin.php b/includes/Admin/Admin.php index 96e8d5b..19d2690 100644 --- a/includes/Admin/Admin.php +++ b/includes/Admin/Admin.php @@ -31,6 +31,7 @@ public function __construct() { add_action( 'woocommerce_update_options_tweak_tab', [ $this, 'update_tweak_settings' ] ); add_filter( 'woocommerce_get_sections_products' , [ $this, 'add_custom_sub_menu' ] ); add_filter( 'woocommerce_get_settings_products' , [ $this, 'my_account_submenu_hide' ], 10, 2 ); + add_filter( 'woocommerce_get_settings_products' , [ $this, 'rename_my_account_menutab' ], 10, 2 ); } /** @@ -142,6 +143,24 @@ public function get_settings() { 'id' => 'wc_advance_tweaks_coupon_select_field', 'options' => $this->get_coupon(), ), + 'show-coupon-checkoutpage-check' => array( + 'name' => __( 'Show coupon in checkout page', 'wc-advance-tweaks' ), + 'type' => 'checkbox', + 'desc' => __( 'Check this box to allow customers see the coupons in checkout page', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_coupon_checkoutpage_checkbox' + ), + 'update-thank-you-title' => array( + 'name' => __( 'Thank You title', 'wc-advance-tweaks' ), + 'type' => 'textarea', + 'desc' => __( 'This will replace woocommerce thank you page title', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_update_thank_you_title' + ), + 'update-thank-you-text' => array( + 'name' => __( 'Thank You text', 'wc-advance-tweaks' ), + 'type' => 'textarea', + 'desc' => __( 'This will replace woocommerce thank you page text', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_update_thank_you_text' + ), 'section_end' => array( 'type' => 'sectionend', 'id' => 'wc-advance-tweaks_section_end' @@ -162,6 +181,7 @@ public function update_tweak_settings () { */ public function add_custom_sub_menu ( $settings_tab ) { $settings_tab['new_submenu'] = __( 'MiscTweaks', 'wc-advance-tweaks'); + $settings_tab['rename_myaccount_menu'] = __( 'MyAccountMenu', 'wc-advance-tweaks'); return $settings_tab; } @@ -170,7 +190,7 @@ public function add_custom_sub_menu ( $settings_tab ) { */ public function my_account_submenu_hide( $settings, $current_section ) { $custom_settings = array(); - if( 'new_submenu' == $current_section ) { + if ( 'new_submenu' == $current_section ) { $custom_settings = array( 'section_title' => array( 'name' => __( 'MiscTweaks', 'wc-advance-tweaks' ), @@ -192,8 +212,76 @@ public function my_account_submenu_hide( $settings, $current_section ) { ) ); return $custom_settings; - } else { + } else { + return $settings; + } + } + + /** + * renamee woocommerce customer my account menu + */ + public function rename_my_account_menutab( $settings, $current_section ) { + $custom_settings = array(); + if ( 'rename_myaccount_menu' == $current_section ) { + $custom_settings = array( + 'section_title' => array( + 'name' => __( 'My-account menu rename', 'wc-advance-tweaks' ), + 'type' => 'title', + 'desc' => '', + 'id' => 'wc_advance_tweaks_my_account_menu_rename' + ), + 'my-account-menutab-dashboard-rename' => array( + 'name' => __( 'Dashboard', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_dashboard_rename' + ), + 'my-account-menutab-orders-rename' => array( + 'name' => __( 'Orders', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename orders menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_orders_rename' + ), + 'my-account-menutab-downloads-rename' => array( + 'name' => __( 'Downloads', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_downloads_rename' + ), + 'my-account-menutab-addresses-rename' => array( + 'name' => __( 'Addresses', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_addresses_rename' + ), + 'my-account-menutab-paymentmethods-rename' => array( + 'name' => __( 'Payment Methods', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_paymentmethods_rename', + ), + 'my-account-menutab-accountdetails-rename' => array( + 'name' => __( 'Account details', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_accountdetails_rename' + + ), + 'my-account-menutab-logout-rename' => array( + 'name' => __( 'Logout', 'wc-advance-tweaks' ), + 'type' => 'text', + 'desc' => __( 'This will rename dashboard menu tab name in my account', 'wc-advance-tweaks' ), + 'id' => 'wc_advance_tweaks_logout_rename' + ), + + 'section_end' => array( + 'type' => 'sectionend', + 'id' => 'wc-advance-tweaks_section_end' + ) + ); + return $custom_settings; + } else { return $settings; - } + } } } diff --git a/includes/Frontend/Frontend.php b/includes/Frontend/Frontend.php index 7b2876b..4bd989b 100644 --- a/includes/Frontend/Frontend.php +++ b/includes/Frontend/Frontend.php @@ -34,8 +34,11 @@ public function __construct() { add_filter( 'woocommerce_add_to_cart_redirect', [ $this, 'wc_get_cart_url' ], 99 ); add_filter( 'woocommerce_cart_item_quantity', [ $this, 'wc_hide_quantity' ], 12, 3 ); add_action( 'woocommerce_cart_collaterals', [ $this, 'woocommerce_coupon_show_field' ] ); - add_action( 'woocommerce_account_menu_items', [ $this, 'woocommerce_my_account_menu' ], 10, 2 ); - + add_action( 'woocommerce_checkout_before_customer_details', [ $this, 'wc_coupon_show_checkout_checkbox' ] ); + add_action( 'woocommerce_account_menu_items', [ $this, 'woocommerce_hide_my_account_menu' ], 10, 2 ); + add_filter( 'woocommerce_account_menu_items', [ $this, 'rename_my_account' ] , 9999 ); + add_filter( 'woocommerce_endpoint_order-received_title', [ $this, 'thank_you_title_edited' ] ); + add_filter( 'woocommerce_thankyou_order_received_text', [ $this,'thank_you_text_edited' ], 20, 2 ); } /** @@ -117,27 +120,86 @@ public function wc_hide_quantity( $product_quantity, $cart_item_key, $cart_item public function woocommerce_coupon_show_field() { $coupons = get_option( 'wc_advance_tweaks_coupon_select_field' ); echo '
'; - echo "" . 'You can use the following discount codes on your cart' . ""; - foreach ( $coupons as $coupon ) { + echo "

" . 'You can use the following discount codes on your cart' . "

"; + ?> +

+ -
-

" . $coupon->get_code() . ""; ?>

+
+

' . $coupon->get_code() . ''; ?>

get_amount(); ?>

get_description(); ?>

+
+
+ woocommerce_coupon_show_field(); + } } /** *hide menu from my-account for customer */ - public function woocommerce_my_account_menu( $menu_links ) { + public function woocommerce_hide_my_account_menu( $menu_links ) { $menus = get_option('wc_advance_tweaks_coupon_select_field'); foreach( $menus as $menu ) { unset( $menu_links[$menu] ); } return $menu_links; } + + /** + * + */ + public function rename_my_account( $items ) { + $dashboard_rename = get_option( 'wc_advance_tweaks_dashboard_rename', 'dashboard' ); + $orders_rename = get_option( 'wc_advance_tweaks_orders_rename' ); + $downloads_rename = get_option( 'wc_advance_tweaks_downloads_rename' ); + $editaddress_rename = get_option( 'wc_advance_tweaks_addresses_rename' ); + $paymentmethods_rename = get_option( 'wc_advance_tweaks_paymentmethods_rename' ); + $editaccount_rename = get_option( 'wc_advance_tweaks_accountdetails_rename' ); + $logout_rename = get_option('wc_advance_tweaks_logout_rename'); + + $items['dashboard'] = ! empty( $dashboard_rename ) ? $dashboard_rename : __( 'Dashboard', 'wc-advance-tweaks' ); + $items['orders'] = ! empty( $orders_rename ) ? $orders_rename : __( 'Orders', 'wc-advance-tweaks' ); + $items['downloads'] = ! empty( $downloads_rename ) ? $downloads_rename : __( 'Downloads', 'wc-advance-tweaks' ); + $items['edit-address'] = ! empty( $editaddress_rename ) ? $editaddress_rename : __( 'Addresses', 'wc-advance-tweaks' ); + $items['payment-method'] = ! empty( $paymentmethods_rename ) ? $paymentmethods_rename : __( 'Payment methods', 'wc-advance-tweaks' ); + $items['edit-account'] = ! empty( $editaccount_rename ) ? $editaccount_rename : __( 'Account details', 'wc-advance-tweaks' ); + $items['customer-logout'] = ! empty( $logout_rename ) ? $logout_rename : __( 'Logout', 'wc-advance-tweaks' ); + + return $items; + } + + /** + * thank you title changed text + */ + public function thank_you_title_edited( $old_title ) { + $thankyou_title = get_option('wc_advance_tweaks_update_thank_you_title'); + return ! empty( $thankyou_title ) ? $thankyou_title : __( 'Order Received', 'wc-advance-tweaks' ); + } + + /** + * thank you page changed text + */ + public function thank_you_text_edited( $thank_you_title, $order ){ + $thankyou_text = get_option('wc_advance_tweaks_update_thank_you_text'); + return ! empty( $thankyou_text ) ? $thankyou_text : __( 'Thank You. Your order has been received.', 'wc-advance-tweaks' ); + + } + + } \ No newline at end of file