WC_Admin_Post_Types::edit_form_after_title() public WC 1.0
Print coupon description textarea field.
{} Это метод класса: WC_Admin_Post_Types{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Admin_Post_Types = new WC_Admin_Post_Types(); $WC_Admin_Post_Types->edit_form_after_title( $post );
- $post(WP_Post) (обязательный)
- Current post object.
Код WC_Admin_Post_Types::edit_form_after_title() WC Admin Post Types::edit form after title WC 5.0.0
public function edit_form_after_title( $post ) {
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
if ( 'shop_coupon' === $post->post_type ) {
?>
<textarea id="woocommerce-coupon-description" name="excerpt" cols="5" rows="2" placeholder="<?php esc_attr_e( 'Description (optional)', 'woocommerce' ); ?>"><?php echo $post->post_excerpt; ?></textarea>
<?php
}
// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
}