You are here

function fillpdf_update_8106 in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x fillpdf.install \fillpdf_update_8106()

Update default FillPDF Service endpoint (if it's currently the default).

File

./fillpdf.install, line 127
Install functions for FillPDF.

Code

function fillpdf_update_8106() {
  $config = \Drupal::getContainer()
    ->get('config.factory');
  $settings = $config
    ->getEditable('fillpdf.settings');
  if ($settings
    ->get('remote_endpoint') === 'fillpdf-service.com/xmlrpc.php') {
    $settings
      ->set('remote_endpoint', 'fillpdf.io/xmlrpc.php');
    $settings
      ->save();
  }
  return t('Default FillPDF Service endpoint updated to fillpdf.io/xmlrpc.php.');
}