小编mad*_*noo的帖子

HTML 文本框:将部分占位符文本设为粗体并加下划线

是否可以仅对输入中占位符文本的特定部分进行样式设置?我希望占位符文本的“单击此处”部分加粗并加下划线。

<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)

感谢您的回答。

问候,

麦迪

html css textbox placeholder

5
推荐指数
2
解决办法
5942
查看次数

获取WooCommerce中变量产品价格的所有变体属性

需要以"常规价格"方式显示属性变体.然而,尽管尝试了显示价格没有成功.请参阅下面显示变化精细的代码.请帮忙显示价格.

       //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)

php wordpress product variations woocommerce

4
推荐指数
1
解决办法
7686
查看次数

Woocommerce-获取结账时自定义字段的值

我有一个灵活的问题,但没有得到任何答案。我在 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 wordpress checkout orders woocommerce

0
推荐指数
1
解决办法
1万
查看次数