• I would like to be able to browse to a URL with a order id parameter and print a woocommerce order variable. Like:

    http://example.com/mycustomfile.php?orderID=value

    when this URL is accessed i want to be able to run php code like

    global $woocommerce;
    $order = new WC_Order( $order_id );
    $the_name = $order->billing_first_name;
    echo $the_name;

    how does this work? I can directly browse to my php file but it wont have access to woocommerce data. How do i hook my own php file into the wordpress system?

The topic ‘Hook Into URL, get Post variables and execute’ is closed to new replies.