This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart'); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, remove Add to Cart Button | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
// Second, add View Product Button | |
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_view_product_button', 10); | |
function woocommerce_view_product_button() { | |
global $product; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add new Redonda customizer panel | |
// Used to hook into the Customizer Manager so the section can be easily enabled/disabled as needed | |
add_filter( 'wpex_customizer_panels', function( $panels ) { | |
$panels['redonda'] = array( | |
'title' => __( 'Redonda', 'total' ), | |
'is_section' => true, | |
); | |
return $panels; | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change button on all external product links | |
add_filter( 'woocommerce_loop_add_to_cart_link', function( $html, $product ) { | |
if ( 'external' === $product->get_type() ) { | |
$html = '<a href="' . esc_url( get_permalink() ) . '/#inquire" class="button">Inquire</a>'; | |
} | |
return $html; | |
}, 10, 2 ); | |
// Add custom inquire button to all external product pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('ywraq_request_a_quote_send_email_from_address','ywraq_request_a_quote_send_email_from_address', 10, 2); | |
function ywraq_request_a_quote_send_email_from_address( $email, $object ){ | |
$email = $object->raq['user_email']; | |
return $email; | |
} | |
add_filter('ywraq_request_a_quote_send_email_from_name','ywraq_request_a_quote_send_email_from_name', 10, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain.com/my-account* | |
domain.com/cart* | |
domain.com/checkout* | |
Disable Apps | |
Disable Peformance | |
Bypass Cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Plugin Name: WooCommerce Enable Reviews - Bulk Edit | |
* Description: Allow enable reviews by bulk edit into WooCommerce | |
* Version: 1.0.0 | |
* Author: Mário Valney | |
* Author URI: http://mariovalney.com | |
* Text Domain: woo-enable-reviews-bulk-edit | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); | |
add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); | |
function change_default_checkout_country() { | |
return 'XX'; // country code | |
} | |
function change_default_checkout_state() { | |
return 'XX'; // state code | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds a prefix to the existing WooCommerce order number. | |
* | |
* @param int $order_id the order ID | |
* @param \WC_Order $order the order object | |
* @return string the updated order number | |
*/ | |
function sv_wc_add_order_number_prefix( $order_id, $order ) { | |
return "SV-{$order_id}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_get_price_html', 'wc_ninja_add_sc_price_display', 20 ); | |
function wc_ninja_add_sc_price_display( $price ) { | |
if ( is_product() ) { | |
echo do_shortcode( '[woocommerce_currency_converter] ' ); | |
} | |
return $price; | |
} | |
//Did this help? Donate me some BTC: 1BEsm8VMkYhSFJ92cvUYwxCtsfsB2rBfiG |