Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6238869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:17:29+00:00 2026-05-24T11:17:29+00:00

In Drupal’s hook_order function, I was wondering if anyone can tell me how I

  • 0

In Drupal’s hook_order function, I was wondering if anyone can tell me how I could find the values of $arg when the case is “new”? The resulting print_r always show up blank for any checkout value such as “billing_first_name” or “billing_last_name” when I try to print $arg out (print_r($arg)) despite having actual values. I have a custom module that is trying to grab the values from $order – would I switch &$arg1 to &$order to retrieve the values? When there is a “case ‘load'”, I get the $order values as I need, but I need the code within the case to be done only when the order is completed, not before.

hook_order($op, &$arg1, $arg2){
 switch($op){
    case 'new':
       // when I do print_r(&$arg1), the value shows the order_id and uid, 
       // but billing_first_name or any inputted value through 
       // the checkout form is blank
       break;
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:17:30+00:00Added an answer on May 24, 2026 at 11:17 am

    For those interested, I came up with this:

    hook_order($op, &$arg1, $arg2){
      switch($op){
         case 'update':
            if($arg2 == "pending") {
            //code here
            }
          break;
       }
      }
    

    Might not be perfect but works close enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Drupal 6 you could use code similar to the following one: function example_user($op,
Drupal 6's cache can be set to disabled, normal or aggressive. I cannot find
Drupal Question: Does anyone have a method of using Views and highlighting a selected/current
Drupal has a print link function that I'm using in my .tpl.php <?php print
in drupal 6, i've been experimenting with menu_tree('menu-name'); but i can't seem to figure
In Drupal, if you want to insert something into the node table, 'nid' can
In drupal 6 you could edit the user and it would give you the
On Drupal 6, I used to have a custom PHP block which accessed arg(0),
In Drupal, I can execute a SQL as follows: $query_object = db_query(SELECT * FROM
Drupal 6.15 search has stopped working. how can I fix it? I've run the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.