Skip to content

Instantly share code, notes, and snippets.

View nrlsyhmina's full-sized avatar
💅

Nurul Syahmina nrlsyhmina

💅
View GitHub Profile
@nrlsyhmina
nrlsyhmina / WooCommerce - Add text after cart table for selected roles
Last active February 15, 2023 06:17
WooCommerce - Add text after cart table for selected roles
/*@ Display text at cart page based on selected roles*/
add_action('woocommerce_before_cart_collaterals', 'tf_cart_page_custom_text');
function tf_cart_page_custom_text() {
if (current_user_can('subscriber')) {
$message = '<div class="cart-custom-message">';
$message.= '<h2>GET FREE SHIPPING</h2>';
$message.=
'<p align="justify">Use freeshipping code to get Free Shipping</p>';
$message.= '</div>';
<form class="mb-4" action="javascript:void(0);">
<input type="text" class="form-control mb-4" placeholder="Name*" id="name" />
<input
type="text"
class="form-control mb-4"
placeholder="Email*"
id="email"
/>
https://api.whatsapp.com/send?phone=6notelefon&text=*Hai%20Nurul%20Syahmina*%0D%0A*Nama:*%20[field id="name"]%0D%0A*Email:*%20[field id="email"]%0D%0A*No%20Telefon:*%20[field id="phone"]%0D%0A*Mesej:*%20[field id="message"]%0D%0ADaripada%20bysyahmina.com
/*This is the CSS (prefixed)*/
selector .elementor-widget-container,
selector .elementor-widget-price-table,
selector .elementor-price-table {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;