Refactor InventoryDistanceBasedSourceSelection plugin to handle exceptions instead of silent fail
Open
@TadeuRodrigues is already working on this.
Since Apr 12, 2020.
Progress: PR created
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
\Magento\InventoryDistanceBasedSourceSelection\Plugin\FillSourceLatitudeAndLongitude
public function beforeSave(
SourceRepositoryInterface $subject,
SourceInterface $source
)array {
if (!$source->getLatitude() && !$source->getLongitude()) {
try {
$latLng = $this->getLatLngFromSource->execute($source);
$source->setLatitude($latLng->getLat());
$source->setLongitude($latLng->getLng());
} catch (\Exception $e) {
unset($e); // Silently fail geo coding
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.