Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Add button next to "ADD TO CART" on product archive

add_action('woocommerce_after_shop_loop_item', 'add_a_custom_button_apply', 1 );
function add_a_custom_button_apply() {
    global $product;

    // Not for variable and grouped products that doesn't have an "add to cart" button
    if( $product->is_type('variable') || $product->is_type('grouped') ) return;

    // Output the custom button linked to the product
    echo '<a class="button custom-button apply-now" href="../act-now/apply-now">' . __('Apply Now') . '</a>';
}
Comment

PREVIOUS NEXT
Code Example
Php :: audio validation in jquery validation 
Php :: PHP Parses a time string according to a specified format 
Php :: change wordpress viewport 
Php :: how to disable a button in a blade file 
Php :: rest api php 
Php :: laravel change db connection on the fly 
Php :: How do I display logged-in username IF logged-in? site:wordpress.stackexchange.com 
Php :: assign to array array of values php 
Php :: switch case or case php 
Php :: consumir soap php 
Php :: codeigniter number format function 
Php :: laravel copy image 
Php :: php trait example 
Php :: how to fetch days old records php mysql 
Php :: create file in directory php 
Php :: php initialize two dimensional array dynamically 
Php :: laravel query when 
Php :: ?: php 
Php :: latavel attach method 
Php :: php file upload code not working in ubuntu 
Php :: convertir date php en français 
Php :: does xampp install php 
Php :: table laravel 
Php :: envoyer des donnees js a php 
Php :: laravel get route 
Php :: phph call functions from other .php file 
Php :: php convert accented characters to html entities 
Php :: pagination using ajax 
Php :: CODEIGNITER codeigniter 4 auth 
Php :: php RFC3339 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =