Skip to content

Commit d88fb71

Browse files
author
=
committed
Added Swiftcomplete to settings page
1 parent cf4350a commit d88fb71

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

swiftcomplete.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@
4343
add_action('woocommerce_admin_order_data_after_shipping_address', 'display_what3words_on_order', 10, 1);
4444
add_filter('woocommerce_form_field', 'remove_checkout_optional_fields_label', 10, 4);
4545
add_filter('woocommerce_admin_order_preview_get_order_details', 'admin_order_preview_add_what3words', 10, 2);
46+
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'swiftcomplete_add_plugin_page_settings_link', 10, 4);
47+
48+
function swiftcomplete_add_plugin_page_settings_link( $actions ) {
49+
$mylinks = array('<a href="' . admin_url( 'options-general.php?page=swiftcomplete' ) . '">' . __('Settings') . '</a>'
50+
);
51+
52+
$actions = array_merge( $mylinks, $actions );
53+
return $actions;
54+
}
4655

4756
if ($settings['w3w_enabled'] == true) {
4857
add_action('woocommerce_after_order_notes', 'display_w3w_field');

0 commit comments

Comments
 (0)