Support woocommerce_payment_gateways_setting_additional_rows filter to allow adding additional table rows

This commit is contained in:
moon 2022-03-30 21:02:52 -07:00
parent 5b31f5acf4
commit 721ff37095
1 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
);
$columns = apply_filters( 'woocommerce_payment_gateways_setting_columns', $default_columns );
$additional_rows = apply_filters( 'woocommerce_payment_gateways_setting_additional_rows', array(), count( $columns ) );
foreach ( $columns as $key => $column ) {
echo '<th class="' . esc_attr( $key ) . '">' . esc_html( $column ) . '</th>';
@ -201,6 +202,9 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
echo '</tr>';
}
foreach ( $additional_rows as $additional_row ) {
echo $additional_row;
}
?>
</tbody>
</table>