How To Customize Position of »add to cart« of WooCommerce on Product Page [closed]

You can do what you want by hooking into the woocommerce_single_product_summary action. The action is executed inside content-single-product.php like this: <?php /** * woocommerce_single_product_summary hook * * @hooked woocommerce_template_single_title – 5 * @hooked woocommerce_template_single_price – 10 * @hooked woocommerce_template_single_excerpt – 20 * @hooked woocommerce_template_single_add_to_cart – 30 * @hooked woocommerce_template_single_meta – 40 * @hooked woocommerce_template_single_sharing – … Read more

Is it right way to create shortcode?

The codex explain, I think, very well the creation of shortcodes http://codex.wordpress.org/Shortcode_API A very basic shortcode function foobar_func( $atts ){ return “foo and bar”; } add_shortcode( ‘foobar’, ‘foobar_func’ ); To use it, you just need to [foobar] The first parameter on add_shortcodeis the name of the shortcode function bartag_func( $atts ) { extract( shortcode_atts( array( … Read more

Change text “My Basket” in woocommerce artificer theme

Technically, woocommerce_cart_link() is added to the site just before the menu by the artificer_header_cart_link() function, which is pluggable, meaning you could change that function to call a function that duplicates woocommere_cart_link() but with the text changed. However, I think the easiest thing to do is to tap into the gettext filter which kicks in for … Read more

Using a Cron Job to dynamically populate a field ONCE, and then making the field blank the next time someone visits page

I’m gonna attempt an answer here: In your GF code, you’re going to need to have a snippet that checks the hidden field in the db first. IF value is blank.. THEN they are not a winner = Proceed. If value is ‘winner’.. then update value to blank… Proceed with ‘winner’ functionality. In your cron, … Read more