是否可以仅对输入中占位符文本的特定部分进行样式设置?我希望占位符文本的“单击此处”部分加粗并加下划线。
<input type="text" class="input-text hasDatepicker" name="wc_order_field_2563" id="wc_order_field_2563" placeholder="Click here to choose your pickup date*: (Tuesday - Saturday)" value="">
Run Code Online (Sandbox Code Playgroud)
感谢您的回答。
问候,
麦迪
需要以"常规价格"方式显示属性变体.然而,尽管尝试了显示价格没有成功.请参阅下面显示变化精细的代码.请帮忙显示价格.
//Getting product attributes
$product_attributes = $product->get_attributes();
if(!empty($product_attributes)){
//Getting product attributes slugs
$product_attribute_slugs = array_keys($product_attributes);
$count_slug = 0;
echo '<div class="product_attributes">';
foreach ($product_attribute_slugs as $product_attribute_slug){
$count_slug++;
// Removing "pa_" from attribute slug and adding a cap to first letter
$attribute_name = ucfirst( str_replace('pa_', '', $product_attribute_slug) );
//echo $attribute_name . ' (';
$attribute_values = get_terms($product_attribute_slug);
$count_value = 0;
//print_r(array_values($available_variations));
foreach($attribute_values as $attribute_value){
$count_value++;
$attribute_name_value = $attribute_value->name; // name value
$attribute_slug_value = $attribute_value->slug; // slug value
$attribute_slug_value = $attribute_value->term_id; // ID value …Run Code Online (Sandbox Code Playgroud) 我有一个灵活的问题,但没有得到任何答案。我在 Woocommerce 结帐字段中使用“结帐字段编辑器”添加了自定义字段。该字段如下所示,似乎工作正常。
<input class="input-text " name="wc_order_field_7542" id="wc_order_field_7542" placeholder="Pickup Date" value="" type="text">
Run Code Online (Sandbox Code Playgroud)
然而,现在我正在开发一个插件,想要获取在这个特定字段中输入的值,但似乎无法弄清楚。对于其他字段,我只需执行以下操作,就像我为“计费电子邮件”所做的那样,并且它正在工作:
public function get_billing_email() {
$billing_email = $this->order->billing_email;
return apply_filters( 'xc_woo_cloud_print_billing_email', $billing_email, $this );
}
public function billing_email() {
echo $this->get_billing_email();
}
Run Code Online (Sandbox Code Playgroud)
我确信我忘记了一些事情并且没有做正确的事情。
任何帮助表示赞赏。
php ×2
woocommerce ×2
wordpress ×2
checkout ×1
css ×1
html ×1
orders ×1
placeholder ×1
product ×1
textbox ×1
variations ×1