Skip to content

Instantly share code, notes, and snippets.

@bporcelli
Created March 22, 2022 12:56
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 bporcelli/c173e021d7e51e91d9d781912ace3a69 to your computer and use it in GitHub Desktop.
Save bporcelli/c173e021d7e51e91d9d781912ace3a69 to your computer and use it in GitHub Desktop.
[MarketShip] Change usable box volume for packing.
<?php
/**
* Changes the usable box volume for MarketShip's packing algorithm to 100%.
*
* @param float $usable_volume Usable volume for packing.
* @param float $total_volume Total box volume.
*
* @return float Updated usable volume.
*/
function marketship_change_usable_box_volume( $usable_volume, $total_volume ) {
return $total_volume;
}
add_filter( 'marketship_usable_box_volume', 'marketship_change_usable_box_volume', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment