Get the inner HTML value of a class - check if this exists on Mysql database - then present something [on...












-5















I own an e-commerce website (WordPress + Woocommerce) and what I would like to do is the following:



Every time a user visits a single product page on my website, my code will have to check if this product's SKU value exists on a database that I will have connected with php and then if finally finds the corresponding value on the database, present something.



The only problem that I am facing up is that I do not know how to get the inner HTML string of this SKU class in order to complete my IF statement! Is there any ideas or codes that will help me get the inner HTML strings of a class?












share|improve this question







New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by AndrewL64, RiggsFolly, Mike M., Cœur, gnat yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – AndrewL64, RiggsFolly, Mike M., Cœur

If this question can be reworded to fit the rules in the help center, please edit the question.














  • Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

    – RiggsFolly
    yesterday
















-5















I own an e-commerce website (WordPress + Woocommerce) and what I would like to do is the following:



Every time a user visits a single product page on my website, my code will have to check if this product's SKU value exists on a database that I will have connected with php and then if finally finds the corresponding value on the database, present something.



The only problem that I am facing up is that I do not know how to get the inner HTML string of this SKU class in order to complete my IF statement! Is there any ideas or codes that will help me get the inner HTML strings of a class?












share|improve this question







New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by AndrewL64, RiggsFolly, Mike M., Cœur, gnat yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – AndrewL64, RiggsFolly, Mike M., Cœur

If this question can be reworded to fit the rules in the help center, please edit the question.














  • Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

    – RiggsFolly
    yesterday














-5












-5








-5








I own an e-commerce website (WordPress + Woocommerce) and what I would like to do is the following:



Every time a user visits a single product page on my website, my code will have to check if this product's SKU value exists on a database that I will have connected with php and then if finally finds the corresponding value on the database, present something.



The only problem that I am facing up is that I do not know how to get the inner HTML string of this SKU class in order to complete my IF statement! Is there any ideas or codes that will help me get the inner HTML strings of a class?












share|improve this question







New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I own an e-commerce website (WordPress + Woocommerce) and what I would like to do is the following:



Every time a user visits a single product page on my website, my code will have to check if this product's SKU value exists on a database that I will have connected with php and then if finally finds the corresponding value on the database, present something.



The only problem that I am facing up is that I do not know how to get the inner HTML string of this SKU class in order to complete my IF statement! Is there any ideas or codes that will help me get the inner HTML strings of a class?









php html wordpress woocommerce






share|improve this question







New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









George FragkosGeorge Fragkos

11




11




New contributor




George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






George Fragkos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by AndrewL64, RiggsFolly, Mike M., Cœur, gnat yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – AndrewL64, RiggsFolly, Mike M., Cœur

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by AndrewL64, RiggsFolly, Mike M., Cœur, gnat yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – AndrewL64, RiggsFolly, Mike M., Cœur

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

    – RiggsFolly
    yesterday



















  • Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

    – RiggsFolly
    yesterday

















Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

– RiggsFolly
yesterday





Welcome, to improve your experience on SO please read how to ask an On Topic question, and the Question Check list and the perfect question and how to create a Minimal, Complete and Verifiable Example and take the tour

– RiggsFolly
yesterday












0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Liquibase includeAll doesn't find base path

How to use setInterval in EJS file?

Petrus Granier-Deferre