Exemplo n.º 1
0
					<label for="webhook_status"><?php 
_e('Status', 'woocommerce');
?>
</label>
					<img class="help_tip" data-tip="<?php 
_e('The options are &quot;Active&quot; (delivers payload), &quot;Paused&quot; (does not deliver), or &quot;Disabled&quot; (does not deliver due delivery failures).', 'woocommerce');
?>
" src="<?php 
echo WC()->plugin_url();
?>
/assets/images/help.png" height="16" width="16" />
				</th>
				<td class="forminp">
					<select name="webhook_status" id="webhook_status" class="wc-enhanced-select">
						<?php 
$statuses = wc_get_webhook_statuses();
$current_status = $webhook->get_status();
foreach ($statuses as $status_slug => $status_name) {
    ?>
							<option value="<?php 
    echo esc_attr($status_slug);
    ?>
" <?php 
    selected($current_status, $status_slug, true);
    ?>
><?php 
    echo esc_html($status_name);
    ?>
</option>
						<?php 
}
Exemplo n.º 2
0
 /**
  * Get the webhook i18n status
  *
  * @return string
  */
 public function get_i18n_status()
 {
     $status = $this->get_status();
     $statuses = wc_get_webhook_statuses();
     return isset($statuses[$status]) ? $statuses[$status] : $status;
 }