Code-Snippets-Functions/Execute a function on a child site/WooCommerce/remove-next-payment-row-my-account-subscription-details.txt

7 lines
375 B
Text

add_filter( 'wcs_subscription_details_table_dates_to_display', 'filter_subscription_details_table_dates' );
function filter_subscription_details_table_dates( $table_dates ) {
if ( is_wc_endpoint_url('view-subscription') && isset($table_dates['next_payment']) ) {
unset($table_dates['next_payment']); // Remove "Next payment" row.
}
return $table_dates;
}