Skip to content

Instantly share code, notes, and snippets.

@kdamsmt
Last active April 13, 2021 10:03
Show Gist options
  • Save kdamsmt/2f0630feb17688928d2c11a95e4271c4 to your computer and use it in GitHub Desktop.
Save kdamsmt/2f0630feb17688928d2c11a95e4271c4 to your computer and use it in GitHub Desktop.
Warning: sprintf(): Too few arguments in class-bulk-upgrader-skin.php on line 154
If you got error code "Warning: sprintf(): Too few arguments in class-bulk-upgrader-skin.php on line 154" when you try to install multiple
plugin in Wordpress when a theme required here is the solution:
Error file location: ROOT/wp-admin/includes/class-bulk-upgrader-skin.php
Your error code:
if ( $this->result && ! is_wp_error( $this->result ) ) {
if ( ! $this->error ) {
echo '<div class="updated js-update-details" data-update-details="progress-' . esc_attr( $this->upgrader->update_current ) . '">' .
'<p>' . sprintf( $this->upgrader->strings['skin_update_successful'], $title ) .
' <button type="button" class="hide-if-no-js button-link js-update-details-toggle" aria-expanded="false">' . __( 'Show details.' ) . '</button>' .
'</p></div>';
}
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
}
Fixed code:
if ( $this->result && ! is_wp_error( $this->result ) ) {
if ( ! $this->error )
echo '<div class="updated"><p>' . sprintf($this->upgrader->strings['skin_update_successful'], $title, 'jQuery(\'#progress-' . esc_js($this->upgrader->update_current) . '\').toggle();jQuery(\'span\', this).toggle(); return false;') . '</p></div>';
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js($this->upgrader->update_current) . '\').hide();</script>';
}
Then you will be fixed as below:
https://imgur.com/iohyc30
Sourced: https://thembay.com/solved-warning-sprintf-arguments-class-bulk-upgrader-skin-php-line-154/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment