I was wondering if it’s possible to implement card.js on WordPress

Seems like you have misplaced the card jquery library. You can include the js using wp_enqueue_script in WordPress. wp_enqueue_script( ‘jquery-card-script’, get_stylesheet_directory_uri() . ‘/js/card.js’, array( ‘jquery’ ), ‘1.0.0’, true ); Use the above code in your child theme functions.php and call your card from your main js file. new Card({ form: document.querySelector(‘form’), container: ‘.card-wrapper’ });

Add external url to WooCommerce My Account navigation

Making a small assumption here. It’s more likely that the actual output looks something like this: <a href=”www.subdomain.domin.com/members/profile”> Profile </a> rather than: <a href=”www.domain.com/my-account/www.subdomain.domain.com/members/profile/”> Profile </a> And your browser is actually filling in for the missing scheme and path. Browsers will assume an href is relative if you don’t use an absolute URI (go figure!) … Read more

I’m trying to display product categories on each product in the list

Product categories in Woocommerce is a term, so you can get the categories with get_the_terms function: echo ‘<h3><a href=”‘ . get_the_permalink() . ‘”>’ . get_the_title() . ‘</a></h3>’; echo ‘<span style=”display:none;” class=”prodcat’; $categories = get_the_terms( get_the_ID(), ‘product_cat’ ); foreach ($categories as $category) { echo ‘ ‘ . $category->name . ”; }; echo ‘”> </span>’;

Clone the “proceed to cart” button and place it above checkout on the cart page, but only appear display size is 320px

Just call woocommerce proceed-to-checkout-button template in woocommerce_before_cart action hook as follows- add_action(‘woocommerce_before_cart’, ‘add_wc_button_proceed_to_checkout’); function add_wc_button_proceed_to_checkout(){ echo ‘<div class=”wc-proceed-to-checkout”>’; wc_get_template( ‘cart/proceed-to-checkout-button.php’ ); echo ‘</div>’; }

Change value of Points earned in product data

Add following code to your functions.php file in theme directory. add_action(‘init’, ‘set_point_earned’); function set_point_earned() { global $wpdb; $wpdb->query(“INSERT INTO {$wpdb->postmeta} (post_id, meta_key, meta_value) SELECT ID, ‘_ywpar_point_earned’, ‘5’ FROM {$wpdb->posts} WHERE post_type IN (‘product’,’product_variation’) AND NOT EXISTS ( SELECT * FROM {$wpdb->postmeta} WHERE post_id = ID AND meta_key = ‘_ywpar_point_earned’ )”); } Then visit your site. … Read more

How can the alt be added to this wooCommerce category image?

Something like this? $image_alt = get_post_meta( $image->id, ‘_wp_attachment_image_alt’, true); To use in your string: if ($image) echo ‘<img src=”‘ . esc_url($image) .'” alt=”.$image_alt.”>woocommerce-CJD”>’; Use it under the $image declaration. In your $image declaration make sure youll get the image attachment via wp_get_attachment_image() function.

WooCommerce 3 get custom variation on process order [closed]

Okay I find solution for this one!! Add field to the each product variation with this one github Remi Corson And because I have a custom gateway plugin for WooCommerce I found there where products are initiated and use foreach to get ‘productId’ for each product. There I use $variation = $item[‘variation_id’]; $productVariation = get_post_custom($variation); … Read more