Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "deactivated" message to the plugins list entry #2759

Merged
merged 6 commits into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions woocommerce-services.php
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ public function attach_hooks() {
add_action( 'woocommerce_checkout_order_processed', array( $this, 'track_completed_order' ), 10, 3 );
add_action( 'admin_print_footer_scripts', array( $this, 'add_sift_js_tracker' ) );
add_action( 'current_screen', array( $this, 'edit_orders_page_actions' ) );
add_action( 'after_plugin_row_woocommerce-services/woocommerce-services.php', array( $this, 'add_custom_message_to_plugin_list' ), 10, 2 );

$tracks = $this->get_tracks();
$tracks->init();
Expand Down Expand Up @@ -1527,6 +1528,30 @@ public function edit_orders_page_actions() {
}
}

/**
* Add a "deactivated" message to the plugin list table for WooCommerce Shipping & Tax
*
* @param string $plugin_file
* @param array $plugin_data
*/
public function add_custom_message_to_plugin_list() {
if ( false ) {
printf(
'<style>
.plugins tr[data-slug="woocommerce-services"] td, .plugins tr[data-slug="woocommerce-services"] th { box-shadow: none; }
</style>
<tr class="plugin-update-tr active update">
<td colspan="4" class="plugin-update colspanchange">
<div class="notice inline notice-warning" style="border:0; border-left: 5px solid #4AB866; padding: 12px; background-color: #EFF9F1;">
<p>%s</p>
</div>
</td>
</tr>',
wp_kses_post( __( 'WooCommerce Shipping & Tax has been deactivated. Your data and settings have been carried over to the dedicated WooCommerce Shipping and WooCommerce Tax extensions.<br />For support, please <a href="https://woocommerce.com/my-account/create-a-ticket/">contact our Happiness Engineers</a>.', 'woocommerce-services' ) )
);
}
}

/**
* Registers the React UI bundle
*/
Expand Down
Loading