8月份因為時間緊迫,為了做這頁WooCommerce捐款,不懂程式,前後請了一位印度工程師幫我做弊寫了四次的程式,共花了US$90。現在要解碼了,還真痛苦,希望能看得懂,別再花錢了。
1- Remove Product Image 用CSS就好了:
Appearance > Customize >
.woocommerce-product-gallery {
display:none;
}
2- Change Button Color
Appearance > Customize > Color > Woo Commerce
3- Change Text-Name Your Price/Add to Cart
- WooCommerce > Settings > Name Your Price
Change the following:
- Minimum Price Text
- Name Your Price Text
- Add to Cart Button Text for Single Product
4-Change Add to Cart Text
https://www.isitwp.com/change-default-add-to-cart-button-text-in-woocommerce/
1 2 3 4 5 | add_filter( 'single_add_to_cart_text' , 'woo_custom_cart_button_text' );
function woo_custom_cart_button_text() {
return __( 'Donate Now' , 'woocommerce' );
}
|
This snippet didn’t work on me.
Used the plugin: https://wordpress.org/plugins/wc-custom-add-to-cart-labels/