Custom code fail after 5 days
-
Hi,
To show the stock status on the single product page I got some code in my functions.php.
It worked fine, but after 5 days my website went down and I got an error on the 5th line; ‘category’ => __’WC Page Templates’, ‘dhvc-woocommerce-page’ ,
I changed it to;
‘category’ => __(‘WC Page Templates’, ‘dhvc-woocommerce-page’) ,
Now the site is fine, but the function doesn’t work anymore.Does anyone know what is wrong?
Thanks for your help in advance!The compleet code I now have is;
add_action( ‘vc_after_set_mode’, function(){
vc_map ( array (
‘name’ => ‘WC Single Product Stock Staus’, ‘dhvc-woocommerce-page’ ,
‘base’ => ‘dhvc_woo_product_page_stock_status’,
‘category’ => __(‘WC Page Templates’, ‘dhvc-woocommerce-page’) ,
‘icon’ => ‘icon-dhvc-woo-product-page’,
‘params’ => array (
array (
‘type’ => ‘textfield’,
‘save_always’=>true,
‘heading’ => __( ‘Label’, ‘dhvc-woocommerce-page’ ),
‘param_name’ => ‘label’,
‘value’=>’This product is’
),
array(
‘type’ => ‘colorpicker’,
‘heading’ => esc_html__( ‘Custom color’, ‘dhvc-woocommerce-page’ ),
‘param_name’ => ‘custom_color’,
‘description’ => esc_html__( ‘Select custom icon color.’, ‘dhvc-woocommerce-page’ ),
),
array (
‘type’ => ‘textfield’,
‘save_always’=>true,
‘heading’ => __( ‘Extra class name’, ‘dhvc-woocommerce-page’ ),
‘param_name’ => ‘el_class’,
‘value’=>”,
‘description’ => __( ‘If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.’, ‘dhvc-woocommerce-page’ )
),
array(
‘type’ => ‘css_editor’,
‘heading’ => __( ‘CSS box’, ‘dhvc-woocommerce-page’ ),
‘param_name’ => ‘css’,
‘group’ => __( ‘Design Options’, ‘dhvc-woocommerce-page’ ),
),
)
) );
});The page I need help with: [log in to see the link]
- The topic ‘Custom code fail after 5 days’ is closed to new replies.