Setting page error

This topic contains 27 replies, has 2 voices, and was last updated by Avatar Mustafa 2 months ago.

  • Author
    Posts
  • #51512 Reply
    Avatar
    Mustafa
    Participant

    Hi,
    When I navigate to the setting page (https://website.com/store-manager/settings/) it is blank! After enable debug mode I see the following error:

    Fatal error: Uncaught Error: Call to a member function get_cities() on null in /home/company1/public_html/wp-content/plugins/wc-frontend-manager/core/class-wcfm-library.php:428 Stack trace: #0 /home/company1/public_html/wp-content/plugins/wc-frontend-manager/core/class-wcfm-frontend.php(884): WCFM_Library->load_scripts(‘wcfm-settings’) #1 /home/company1/public_html/wp-includes/class-wp-hook.php(286): WCFM_Frontend->wcfm_scripts(”) #2 /home/company1/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 /home/company1/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array) #4 /home/company1/public_html/wp-includes/script-loader.php(2463): do_action(‘wp_enqueue_scri…’) #5 /home/company1/public_html/wp-includes/class-wp-hook.php(286): wp_enqueue_scripts(”) #6 /home/company1/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #7 /home/company1/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array) #8 /home/company1/public_html/wp-includ in /home/company1/public_html/wp-content/plugins/wc-frontend-manager/core/class-wcfm-library.php on line 428

  • #51515 Reply
    Avatar
    Mustafa
    Participant

    It is fixed after remove this filter
    add_filter(‘wcfmmp_city_select_dropdown_enabled’, ‘__return_true’ );

    But this disabled shipping by city

  • #51516 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Yeah right, but there was a special plugin for this. Possibly you had disabled that by mistake. Kindly check.

    Thank You

  • #51811 Reply
    Avatar
    Mustafa
    Participant

    Is it the “WC City Select” plugin?

  • #51816 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Right, this is the plugin.

  • #51961 Reply
    Avatar
    Mustafa
    Participant

    I don’t want to use that plugin and I’ve added cities using code below and made select field searchable so user can easily find their city:

    
    /**
     * Change the checkout city field to a dropdown field.
     */
    function change_city_to_dropdown( $fields ) {
    	$city_args = wp_parse_args( array(
    		'type' => 'select',
    		'options' => array(
    			'city1' => 'city1',
    			'city2' => 'city2'
    		),
    		'input_class' => array(
    			'wc-enhanced-select',
    		)
    	), $fields['shipping']['shipping_city'] );
    	
    	$fields['shipping']['shipping_city'] = $city_args;
    	$fields['billing']['billing_city'] = $city_args;
    	wc_enqueue_js( "
    	jQuery( ':input.wc-enhanced-select' ).filter( ':not(.enhanced)' ).each( function() {
    		var select2_args = { minimumResultsForSearch: 5 };
    		jQuery( this ).select2( select2_args ).addClass( 'enhanced' );
    	});" );
    	return $fields;
    }
    add_filter( 'woocommerce_checkout_fields', 'change_city_to_dropdown' );
    

    How can those cities that were added as a checkout field be supported in WCfM shipping?

    Regards,

  • #51977 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Well, this is only for WC Checkout, certainly it has no effect on Shipping setting.

    Better use that plugin and enable using filter – add_filter(‘wcfmmp_city_select_dropdown_enabled’, ‘__return_true’ );

    Thank You

  • #51985 Reply
    Avatar
    Mustafa
    Participant

    I want to use the plugin but then how can I enable select field to be searchable? See attached for better idea.

    Attachments:
    You must be logged in to view attached files.
  • #51994 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Well, that field become searchable select box only because of this custom code –

    wc_enqueue_js( "
    	jQuery( ':input.wc-enhanced-select' ).filter( ':not(.enhanced)' ).each( function() {
    		var select2_args = { minimumResultsForSearch: 5 };
    		jQuery( this ).select2( select2_args ).addClass( 'enhanced' );
    	});" );

    Now, you may add those anywhere to make that city field searchable!

    Thank you

  • #51996 Reply
    Avatar
    Mustafa
    Participant
    This reply has been marked as private.
  • #52085 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    When user navigate to the checkout page and select their state, the city field does not refresh and not active and I have to refresh the entire page to take effect.

    Your custom code was also not work like this, then how solve this?

    Between, are you using this city plugin ? https://wordpress.org/plugins/wc-city-select/

    Thank You

  • #52101 Reply
    Avatar
    Mustafa
    Participant

    The custom code was working but was not linked to states. I removed the custom code and now using this plugin
    https://wordpress.org/plugins/wc-city-select/

    How can I resolve this issue?

  • #52179 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Well, this plugin supports state wise city list.

    Do you have configured this correctly? Please re-check.

    Thank You

  • #52200 Reply
    Avatar
    Mustafa
    Participant

    I have double checked many times but same issue. Please support.

  • #52380 Reply
    Avatar
    Mustafa
    Participant
    This reply has been marked as private.
  • #52384 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    OK, send me. I will take a look at it.

    Thank You

  • #52388 Reply
    Avatar
    Mustafa
    Participant
    This reply has been marked as private.
  • #52418 Reply
    Avatar
    Mustafa
    Participant
    This reply has been marked as private.
  • #53044 Reply
    Avatar
    Mustafa
    Participant

    Still waiting for your support.

  • #53086 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    Please, look into attached issue as well in the profile page edit. (See attached)

    – Is this resolve for you after latest update ?

    Thank You

  • #53097 Reply
    Avatar
    Mustafa
    Participant

    The profile issue is resolved after the latest update. Thanks!

    What about the wp city list?

  • #53184 Reply
    Avatar
    Mustafa
    Participant

    Any update on wp city list issue? Please check

  • #53253 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    We are checking this, I will know you soon!

    Thank You

  • #53287 Reply
    Avatar
    Mustafa
    Participant

    Good to know. Please, expedite the fix 🙂

  • #53526 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    I am updating you over email.

  • #53529 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Please check now!

  • #53611 Reply
    Avatar
    Mustafa
    Participant

    Still issue is there.

  • #54403 Reply
    Avatar
    Mustafa
    Participant

    Any update please?

Reply To: Setting page error
Your information: