Skip to content

Instantly share code, notes, and snippets.

@kartikparmar
Created November 15, 2023 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kartikparmar/f2ef70d4b10613b01f9557fd685e9f55 to your computer and use it in GitHub Desktop.
Save kartikparmar/f2ef70d4b10613b01f9557fd685e9f55 to your computer and use it in GitHub Desktop.
add additional text after price
<?php
add_filter( 'bkap_final_price_json_data', 'custom_changes', 10, 3 );
function custom_changes( $wp_send_json, $product_id, $price ) {
$wp_send_json['bkap_price'] = $wp_send_json['bkap_price'] . ' ' . __( '20% off for selected period', 'woocommerce-booking' );
return $wp_send_json;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment