Skip to content

How can I get the a selected option of Admin->configuration->Sales->Deliver Methods->field id? I need to inject this into a class

I will be injecting this into a ViewModel or Plugin.
I have a custom configurable field in the Admin->configuration->Sales->Deliver Methods->flatrate and I need to check the value of it to compare with another string because it will change over time.

Example:

if ($this->flatrateConfigCustomOptionValue === $value) {}