Displaying order ID as a UNIQUE string type in woocommerceHow do I get PHP errors to display?How do I check if a string contains a specific word?Reference - What does this error mean in PHP?WooCommerce - Add $order_total to place order buttonWooCommerce order details after checkout pagePassing custom data from cart items to Order meta in Woocommerce 3Show WooCommerce Pay page content on checkout in model box after Place orderRedirect after order created on Woocommerce checkout pageWoocommerce place order button script

Why does Windows store Wi-Fi passwords in a reversible format?

What happened to the HDEV ISS Experiment? Is it over?

Where does learning new skills fit into Agile?

Can you grapple/shove when affected by the Crown of Madness spell?

Did anybody find out it was Anakin who blew up the command center?

Are game port joystick button circuits more than plain switches? Is this one just faulty?

Does EU 261/2004 compensation apply if delayed by the border check?

How should i charge 3 lithium ion batteries?

"There were either twelve sexes or none."

Can I get a PhD for developing an educational software?

Gambler coin problem: fair coin and two-headed coin

Count the number of paths to n

Why can't I access the 'name' of an object when looping through the scene's objects?

What's special ammo?

Thought experiment and possible contradiction between electromagnetism and special relativity

How do you capitalize agile costs with less mature teams?

Changing JPEG to RAW to use on Lightroom?

Prevent use of CNAME record for untrusted domain

What do these commands specifically do?

How does the OS tell whether an "Address is already in use"?

Rent contract say that pets are not allowed. Possible repercussions if bringing the pet anyway?

Unlock your Lock

Redacting URLs as an email-phishing preventative?

Retroactively modifying humans for Earth?



Displaying order ID as a UNIQUE string type in woocommerce


How do I get PHP errors to display?How do I check if a string contains a specific word?Reference - What does this error mean in PHP?WooCommerce - Add $order_total to place order buttonWooCommerce order details after checkout pagePassing custom data from cart items to Order meta in Woocommerce 3Show WooCommerce Pay page content on checkout in model box after Place orderRedirect after order created on Woocommerce checkout pageWoocommerce place order button script






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Ok I want to display the latest Order id as a unique string without the #



I have used this code to attempt to display on checkout page but it displays nothing.



<?php print $order->get_id();?>


Also i would like a function that allows the place order button on the checkout page to run my custom gateway when its pressed currently I am doing this using html.










share|improve this question


























  • In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

    – LoicTheAztec
    Mar 27 at 21:26

















0















Ok I want to display the latest Order id as a unique string without the #



I have used this code to attempt to display on checkout page but it displays nothing.



<?php print $order->get_id();?>


Also i would like a function that allows the place order button on the checkout page to run my custom gateway when its pressed currently I am doing this using html.










share|improve this question


























  • In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

    – LoicTheAztec
    Mar 27 at 21:26













0












0








0








Ok I want to display the latest Order id as a unique string without the #



I have used this code to attempt to display on checkout page but it displays nothing.



<?php print $order->get_id();?>


Also i would like a function that allows the place order button on the checkout page to run my custom gateway when its pressed currently I am doing this using html.










share|improve this question
















Ok I want to display the latest Order id as a unique string without the #



I have used this code to attempt to display on checkout page but it displays nothing.



<?php print $order->get_id();?>


Also i would like a function that allows the place order button on the checkout page to run my custom gateway when its pressed currently I am doing this using html.







php woocommerce






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 20:04







Barker Antony

















asked Mar 27 at 19:51









Barker AntonyBarker Antony

284 bronze badges




284 bronze badges















  • In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

    – LoicTheAztec
    Mar 27 at 21:26

















  • In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

    – LoicTheAztec
    Mar 27 at 21:26
















In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

– LoicTheAztec
Mar 27 at 21:26





In checkout page, the order ID doesn't exist yet… Only in "Order received" page (thankyou page).

– LoicTheAztec
Mar 27 at 21:26












1 Answer
1






active

oldest

votes


















0















If i'm understanding correctly your function get_id() is returning something like "#1234";



In this case you could just do a str_replace(). For example:



$id = "#1234";



$id = (int) str_replace("#", "", $id);



If not, please edit your question.






share|improve this answer

























  • ok how do i put that in php

    – Barker Antony
    Mar 27 at 20:06











  • @BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

    – Flo Faber
    Mar 27 at 20:08












  • Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

    – Flo Faber
    Mar 27 at 20:10











  • public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

    – Barker Antony
    Mar 27 at 21:54











  • giving a 500 http error

    – Barker Antony
    Mar 27 at 21:54










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385411%2fdisplaying-order-id-as-a-unique-string-type-in-woocommerce%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0















If i'm understanding correctly your function get_id() is returning something like "#1234";



In this case you could just do a str_replace(). For example:



$id = "#1234";



$id = (int) str_replace("#", "", $id);



If not, please edit your question.






share|improve this answer

























  • ok how do i put that in php

    – Barker Antony
    Mar 27 at 20:06











  • @BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

    – Flo Faber
    Mar 27 at 20:08












  • Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

    – Flo Faber
    Mar 27 at 20:10











  • public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

    – Barker Antony
    Mar 27 at 21:54











  • giving a 500 http error

    – Barker Antony
    Mar 27 at 21:54















0















If i'm understanding correctly your function get_id() is returning something like "#1234";



In this case you could just do a str_replace(). For example:



$id = "#1234";



$id = (int) str_replace("#", "", $id);



If not, please edit your question.






share|improve this answer

























  • ok how do i put that in php

    – Barker Antony
    Mar 27 at 20:06











  • @BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

    – Flo Faber
    Mar 27 at 20:08












  • Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

    – Flo Faber
    Mar 27 at 20:10











  • public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

    – Barker Antony
    Mar 27 at 21:54











  • giving a 500 http error

    – Barker Antony
    Mar 27 at 21:54













0














0










0









If i'm understanding correctly your function get_id() is returning something like "#1234";



In this case you could just do a str_replace(). For example:



$id = "#1234";



$id = (int) str_replace("#", "", $id);



If not, please edit your question.






share|improve this answer













If i'm understanding correctly your function get_id() is returning something like "#1234";



In this case you could just do a str_replace(). For example:



$id = "#1234";



$id = (int) str_replace("#", "", $id);



If not, please edit your question.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 19:59









Flo FaberFlo Faber

1




1















  • ok how do i put that in php

    – Barker Antony
    Mar 27 at 20:06











  • @BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

    – Flo Faber
    Mar 27 at 20:08












  • Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

    – Flo Faber
    Mar 27 at 20:10











  • public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

    – Barker Antony
    Mar 27 at 21:54











  • giving a 500 http error

    – Barker Antony
    Mar 27 at 21:54

















  • ok how do i put that in php

    – Barker Antony
    Mar 27 at 20:06











  • @BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

    – Flo Faber
    Mar 27 at 20:08












  • Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

    – Flo Faber
    Mar 27 at 20:10











  • public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

    – Barker Antony
    Mar 27 at 21:54











  • giving a 500 http error

    – Barker Antony
    Mar 27 at 21:54
















ok how do i put that in php

– Barker Antony
Mar 27 at 20:06





ok how do i put that in php

– Barker Antony
Mar 27 at 20:06













@BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

– Flo Faber
Mar 27 at 20:08






@BarkerAntony May you can post some code of your get_id() function? It would help me a lot.

– Flo Faber
Mar 27 at 20:08














Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

– Flo Faber
Mar 27 at 20:10





Or you just do <?php print(str_replace("#", "", $order->get_id()); ?>

– Flo Faber
Mar 27 at 20:10













public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

– Barker Antony
Mar 27 at 21:54





public function get_order_id( $context = 'view' ) return $this->get_prop( 'order_id', $context );

– Barker Antony
Mar 27 at 21:54













giving a 500 http error

– Barker Antony
Mar 27 at 21:54





giving a 500 http error

– Barker Antony
Mar 27 at 21:54








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385411%2fdisplaying-order-id-as-a-unique-string-type-in-woocommerce%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?