To view in Front end :

changed Style in WPSLP in QC and refreshed

SLP plug-in Version 2511.08.05  with current v  2511.06.02 add-on, (Exp and Premier enabled)

Visit site and critical error from WordPress pops up. Error log credentials library

With Chrome error message (index) Content unavailable . Resource was not cached.

From the QC Apache Error Log

 Uncaught ArgumentCountError: Too few arguments to function
 SLP_UI_Shortcode_slp_option::modify(), 
0 passed in /bitnami/wordpress/wp-content/plugins/slp-premier/include/module/ui/SLP_Premier_UI.php on line 114 
and exactly 1 expected in 
/bitnami/wordpress/wp-content/plugins/store-locator-plus/include/module/ui/SLP_UI_Shortcode_slp_option.php:16

Resolution

Revise \SLP_Premier_UI::process_hook_ShortcodeSLPOption to ensure it both accepts the attributes parameter and sends it along to \SLP_UI_Shortcode_slp_option::modify

Findings

  • \SLP_Premier_UI::process_hook_ShortcodeSLPOption is not passing attributes coming in from the shortcode

Research

Error is coming from \SLP_Premier_UI::process_hook_ShortcodeSLPOption
Called when processing slp_option shortcode via add_filter( ‘shortcode_slp_option’, [ $this, ‘process_hook_ShortCodeSLPOption’ ] );

\SLP_UI_Shortcode_slp_option::modify requires the attributes array to be passed in.

Documentation

Ω \SLP_UI_Shortcode_slp_option

λ \SLP_UI_Shortcode_slp_option::modify
phpDoc
	 * Insert add-on options into the [slp_option <js|nojs|name>="option_value"] shortcode.
     *
     * @used-by \SLP_Experience_UI::process_hook_ShortCodeSLPOption
     * @used-by \SLP_Premier_UI::process_hook_ShortcodeSLPOption
	 *
	 * @param array $attributes
	 *
	 * @return array

Leave a Reply