I just need to review/explore the array of built in checkout_panes so that I can debug it. However, the following code does not display any result.


function mymodule_commerce_checkout_pane_info_alter(&$checkout_pane) {
//Does not work
dpm ($checkout_pane);
//Does not work
drupal_set_message ($checkout_pane);
//Does not work
drupal_set_message (print_r($checkout_pane));

It might be too basic but being a beginner in drupal/PHP I have already spent a day trying to resolving it. Any assistance will be highly appreciated.


You probably don't see a message because the results of the hook you're implementing are cached; you need to clear the cache to get the code to run. You'll want to clear it from within the browser so the message is put in the right session.

Perhaps the easiest method for this is to install the Admin Menu module, which gives you a direct link to flush the caches. When the page reloads after the cache clear, you should see the checkout pane details.

I'd recommend sticking with dpm() (assuming you have Devel installed), that's the best of the three methods in your code for inspecting vars.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.