function wc_cart_button_text() { global $product; $product_type = $product->product_type; switch ( $product_type ) { case 'external': return __( 'Comprar1', 'woocommerce' ); break; case 'grouped': return __( 'Ver Productos1', 'woocommerce' ); break; case 'simple': return __( 'Añadir al carrito', 'woocommerce' ); break; case 'variable': return __( 'Seleccionar1', 'woocommerce' ); break; default: return __( 'Leer Más1', 'woocommerce' ); } } add_filter( 'woocommerce_product_add_to_cart_text', 'wc_cart_button_text' );
Solo necesitas reemplazar en el archivo woocommerce-checkout-manager.php la función wccs_custom_checkout_field_process().
Error:
Fatal error: Call to undefined method WooCommerce::add_error()
function wccs_custom_checkout_field_process() { global $woocommerce; $options = get_option( 'wccs_settings' ); if ( count( $options['buttons'] ) > 0 ) : foreach ( $options['buttons'] as $btn ) : if ( (!$_POST[ ''.$btn['cow'].'' ] ) && (true == ($btn['checkbox']) ) ) //$woocommerce->add_error( '<strong>'.$btn['label'].'</strong> '. __('is a required field', 'woocommerce-checkout-manager' ) . ' '); wc_add_notice( '<strong>' . $btn['label'] . '</strong> ' . __( 'is a required field.', 'woocommerce' ), 'error' ); endforeach; endif; }