我找到了答案,我在这里为任何想这样做的人写下:
为了显示自定义字段,以下代码应添加到函数payment\\u字段中:
public function payment_fields(){
if ( $description = $this->get_description() ) {
echo wpautop( wptexturize( $description ) );
}
?>
<div id="custom_input">
<p class="form-row form-row-wide">
<label for="TedadGhest" class="">
<?php _e(\'number of installment\', \'oti_iran_hekmat\'); ?>
</label>
<select name="TedadGhest" id="TedadGhest">
<option value="6">6</option>
<option value="12">12</option>
<option value="18">18</option>
<option value="24">24</option>
</select>
</p>
</div>
<?php
}