Get the inner HTML value of a class - check if this exists on Mysql database - then present something [on...
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
New contributor
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.
add a comment |
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
New contributor
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
add a comment |
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
New contributor
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
php html wordpress woocommerce
New contributor
New contributor
New contributor
asked yesterday
George FragkosGeorge Fragkos
11
11
New contributor
New contributor
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
add a comment |
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
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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