I want to change the following file: vendor/magento/module-paypal/Model/SmartButtonConfig.php but if I made the modifications directly in the vendor file when I will upgrade my store this modifications will be lost. How I can add this file in the app/code or what is the best way to can modify this file?
Thank you
Public function:
private function getButtonStyles(string $page): array
{
$styles = $this->defaultStyles[$page];
if ((boolean)$this->config->getValue("{$page}_page_button_customize")) {
$styles['layout'] = $this->config->getValue("{$page}_page_button_layout");
$styles['size'] = $this->config->getValue("{$page}_page_button_size");
$styles['color'] = $this->config->getValue("{$page}_page_button_color");
$styles['shape'] = $this->config->getValue("{$page}_page_button_shape");
$styles['label'] = $this->config->getValue("{$page}_page_button_label");
$styles['height'] = 55;
$styles['tagline'] = false;
$styles['fundingicons'] = false;
$styles = $this->updateStyles($styles, $page);
}
return $styles;
}
I want to add only this:
$styles['height'] = 55;
$styles['tagline'] = false;
$styles['fundingicons'] = false;
in the private function getButtonStyles