Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Customer Order Note for WooCommerce Products

// Display custom field on single product page function d_extra_product_field(){ $value = isset( $_POST[‘extra_product_field’] ) ? sanitize_text_field( $_POST[‘extra_product_field’] ) : ”; printf( ‘ %s ‘, __( ‘Customisation note:’ ), esc_attr( $value ) ); } add_action( ‘woocommerce_after_add_to_cart_button’, ‘d_extra_product_field’, 9 ); //…Continue reading