diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index c834f7e2f37f..9c25f923a085 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -736,7 +736,7 @@ public function render_shop_webhook_columns( $column ) { break; case 'webhook_status' : - echo $the_webhook->get_status(); + echo $the_webhook->get_i18n_status(); break; case 'webhook_topic' : echo $the_webhook->get_topic(); diff --git a/includes/class-wc-webhook.php b/includes/class-wc-webhook.php index a01558e6f2e3..bbcb0d0c56d4 100644 --- a/includes/class-wc-webhook.php +++ b/includes/class-wc-webhook.php @@ -629,6 +629,22 @@ public function get_status() { return apply_filters( 'woocommerce_webhook_status', $status, $this->id ); } + /** + * Get the webhook i18n status + * + * @return string + */ + public function get_i18n_status() { + $status = $this->get_status(); + $statuses = apply_filters( 'woocommerce_webhook_i18n_statuses', array( + 'active' => __( 'Active', 'woocommerce' ), + 'paused' => __( 'Paused', 'woocommerce' ), + 'disabled' => __( 'Disabled', 'woocommerce' ), + ) ); + + return isset( $statuses[ $status ] ) ? $statuses[ $status ] : $status; + } + /** * Update the webhook status, see get_status() for valid statuses *