php


woocommerce hooks warning “function not found”


I wanted to use hooks in my woocommerce single product page to do some changes.
So I added the following code into my function.php in my child-theme:
add_action( 'woocommerce_single_product_summary',' woocommerce_template_single_add_to_cart', 35 );
Now there should be a second add-to-cart button on my product page.
But all I get is the following warning:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ' woocommerce_template_single_add_to_cart' not found or invalid function name in /home/userXXX/htdocs/vintagehome/wp-includes/class-wp-hook.php on line 298
You guys are my last chance to get this thing done!
Please help me..
Greets
Alex
// define the woocommerce_single_product_summary callback
function action_woocommerce_single_product_summary( $woocommerce_template_single_title, $int ) {
// make action magic happen here...
};
// add the action
add_action( 'woocommerce_single_product_summary', 'action_woocommerce_single_product_summary', 10, 2 );

Related Links

Where can I find free PHP forms?
set total number of checkbox in array
ZIP Files get corrupted by IE
quickest way to display data
How do you manage database connections in php?
Open id and facebook implementation in php?
MySql variables and php
Extract hyperlinks from .doc
Parsing the string in PHP
PHP Japanese Strings getting set to?
Need to decode ascii for xml file, into literal characters
WordPress : highlight parent categories while browsing category
PHP Authentication with monthly billing
How can I revert a 'draggable' upon failed AJAX request?
Regexp to add attribute in any xml tags
Possible types of $_POST and $_GET values

Categories

HOME
svn
azure-functions
schema.org
opencv-python
plpgsql
embedded-resource
mongoid
consul
openflow
onvif
scheduler
eddystone
xamarin-zebble
colors
business-intelligence
susy-sass
gmp
deepfreeze
gitkraken
android-permissions
coreldraw
backtracking
list-comprehension
running-object-table
history.js
react-bootstrap-table
ibm-connections
jsonresult
audit
locks
quick-nimble
directfb
sspi
extbase
imgur
axis
liteide
roracle
android-5.0-lollipop
non-linear-regression
simple-schema
scala-collections
test-data
glimpse
dynamics-crm-4
mechanicalturk
openerp-6
cognos-tm1
pbx
streamwriter
libharu
callouts
oci
android-sdcard
eclemma
highlighting
mathnet
mercurial-extension
persistent-object-store
i2b2
certificate-authority
flask-security
json-spirit
chicagoboss
fanotify
ambiguity
mixins
netdatacontractserializer
360-degrees
wlanapi
kotlin-android-extensions
subview
debug-symbols
iodocs
device-admin
aho-corasick
screwturn
spring-social-linkedin
mod-perl
particle-swarm
colon
discovery
boinc
form-for
microformats
jquery-lazyload
ckeditor.net
daap
chronometer
prefuse
wiktionary
glx
mmc3
play2-mini
office-automation
winsxs
ognl
android-2.1-eclair
mongrel
aggregator
sscli
fgetc
browser-based
.net-client-profile
inversion
gui-designer
remote-working
service-factory

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App