• Resolved jeremycoincapital

    (@jeremycoincapital)


    Hello,

    I just installed the plugin. When i go on my card page, i have errors on the page :

    […] Validation de la commande […]
    Avez-vous un code promo ? Cliquez ici pour entrer votre code

    Notice: Undefined index: priority in /home/content/n3pnexwpnas04_data02/64/41501264/html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1526

    Notice: Undefined index: priority in /home/content/n3pnexwpnas04_data02/64/41501264/html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1526

    Notice: Undefined index: priority in /home/content/n3pnexwpnas04_data02/64/41501264/html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1526

    Notice: Undefined index: priority in /home/content/n3pnexwpnas04_data02/64/41501264/html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1526

    […] Détails de facturation […]

    Please help
    Thank you

    The page I need help with: [log in to see the link]

Viewing 5 replies - 16 through 20 (of 20 total)
  • Jamie

    (@digitalchild)

    Hello,

    You can modify the source and update it to the following:

    https://github.com/woocommerce/woocommerce/pull/21801/files

    Add this above the return

     if ( ! isset( $a['priority'], $b['priority'] ) ) {
       return 0;
     }

    This is the official fix that will be in 3.5.2 if you can’t wait till this is updated.

    cheers,

    Jamie
    Lead Developer
    WC Vendors Marketplace

    derfberg

    (@derfberg)

    For anyone following along I can report that I had an issue unrelated to this bug. Once I resolved that issue – @jesshilario fix did work as expected. Thanks!

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @derfberg – I have no idea on the release date. The PR has been merged into core so that suggests it’s indeed going to be included in the next version.

    You can follow the progress for that here: https://github.com/woocommerce/woocommerce/milestone/133

    That said, I’ll mark this thread as resolved as we’ve found what’s causing the problem, and suggested some temporary solutions, while we can look at the progress for 3.5.2 on the WooCommerce GitHub repo.

    Thanks all for the contributions and the creative thinking.

    Ilya Kogan

    (@ilyakogan)

    Hi @jobthomas

    Undefined index: priority” Notice is still reproducing for:
    $fields['account']['account_username'] and $fields['account']['account_password'].

    Temporary fix:

    add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields', 1 );
    function custom_override_checkout_fields( $fields ) {
    	if ( isset( $fields['account']['account_username'] ) ) {
    		$fields['account']['account_username']['priority'] = 1;	
    	}
    	
    	if ( isset( $fields['account']['account_password'] ) ) {
    		$fields['account']['account_password']['priority'] = 1;	
    	}				
    
    	return $fields;
    }
    • This reply was modified 6 years ago by Ilya Kogan.
    shahidcheema

    (@shahidcheema)

    For time being until 3.5.2 is not released you can do hide this to solve the error.

    under /wp-content/plugins/woocommerce/includes

    in class-wc-checkout.php file line no 243 -> 246 comment it

    /* foreach ( $this->fields as $field_type => $fields ) {
    // Sort each of the checkout field sections based on priority.
    uasort( $this->fields[ $field_type ], ‘wc_checkout_fields_uasort_comparison’ );
    } */

    Hope this helps ??

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Bug on checkout’ is closed to new replies.