samrhein
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] How to pass product name through Stripe@ismartpink I confirmed that the code still works with WooCommerce version 3.3.3 and WooCommerce Stripe Gateway version 4.0.7. Perhaps you are using older versions of these plugins or have a plugin/theme conflict. What’s the fatal error you’re getting?
Thanks @webdados your fix works. The code referenced starts on line 243 of search-everything.php
Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] How to pass product name through StripeYep, functions.php. Maybe this doesn’t support certain product types – what product type did you test it with? I’m successfully using it with Simple and Variable product orders.
Try turning on Stripe error logging in WooCommerce at /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe ‘Log debug messages’ at the bottom. Make a purchase, then at /wp-admin/admin.php?page=wc-status&tab=logs view the ‘woocommerce-gateway-stripe…’ log. It should log something like this for the transaction:
11-16-2017 @ 17:36:09 - Info: Begin processing payment for order 61 for the amount of 1.00 11-16-2017 @ 17:36:09 - charges request: Array ( [currency] => usd [amount] => 100 [description] => Test Store - Order 61 [capture] => true [expand[]] => balance_transaction [metadata] => Array ( [Customer Name] => John Doe [Customer Email] => [email protected] [Total Tax Charged] => 0 [Total Shipping Charged] => 0 [Line Item 1] => Product name: Test Simple Product | Quantity: 1 | Item total: 1.00 ) [source] => XXXXXXXXXXXXXXXXXXXXXXX )
In Stripe the payment Metadata is viewable when you click on a payment for more details from here https://dashboard.stripe.com/payments. e.g.
Metadata
Customer Email – [email protected]
Customer Name – John Doe
Line Item 1 – Product name: Test Simple Product | Quantity: 1 | Item total: 1.00
Total Shipping Charged – 0
Total Tax Charged – 0Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] How to pass product name through StripeHi folks, you can use the filter wc_stripe_payment_metadata. For example:
//add order details to Stripe payment metadata function filter_wc_stripe_payment_metadata( $metadata, $order, $source ) { $order_data = $order->get_data(); $metadata['Total Tax Charged'] = $order_data['total_tax']; $metadata['Total Shipping Charged'] = $order_data['shipping_total']; $count = 1; foreach( $order->get_items() as $item_id => $line_item ){ $item_data = $line_item->get_data(); $product = $line_item->get_product(); $product_name = $product->get_name(); $item_quantity = $line_item->get_quantity(); $item_total = $line_item->get_total(); $metadata['Line Item '.$count] = 'Product name: '.$product_name.' | Quantity: '.$item_quantity.' | Item total: '. number_format( $item_total, 2 ); $count += 1; } return $metadata; } add_filter( 'wc_stripe_payment_metadata', 'filter_wc_stripe_payment_metadata', 10, 3 );
Forum: Themes and Templates
In reply to: Theme doesn't register my CSS updatesI solved this issue by commenting out line 82 in bones.php
add_filter( 'style_loader_src', 'bones_remove_wp_ver_css_js', 9999 );
Forum: Plugins
In reply to: [Participants Database] [Plugin: Participants Database] Textarea formattingI had this problem as well. I solved it by changing the line
$values[] = self::prep_field_for_display($participant[$column->name], $column->form_element);
in participants-database.php (plugin version 1.4.4) to:
$values[] = nl2br(self::prep_field_for_display($participant[$column->name], $column->form_element));
(just adding the nl2br() function) In order to output html line breaks on the List Participants page. Good luck!I ultimately ended up just using the built in menu system to create a menu for each parent page that includes all of it’s children – the downside is that it doesn’t update automatically if child pages are added – but it was a quick solution if you don’t have many pages. You can see it in action here https://www.oneheartsource.org/childrens-home/life/
Yeah I’m only displaying subpages. I just got around the problem by styling the current_page_item
Forum: Themes and Templates
In reply to: Adding image captions – Portfolium themeMake sure the photos you uploaded to your portfolio galleries have captions then open up single-portfolio.php, find the foreach statement and replace the echo line in there with:
echo "<div>"; echo wp_get_attachment_image($attachment->ID, 'full'); $caption = $attachment->post_excerpt; echo "<p class='portfolio_caption'>$caption</p></div>";
then style .portfolio_caption