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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

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