We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prezados achei o seguinte código a ser adicionado no Functions.php para add o banner do E-Bit no woocommerce:
?php add_action( 'woocommerce_thankyou', 'ebit_banner' );
function ebit_banner( $order_id ) {
$store_id = ''; // o ID da sua loja $buscape_id = ''; // o ID único do Buscapé
$order = wc_get_order( $order_id ); $order_items = $order->get_items();
foreach ( $order_items as $item ) { $product = wc_get_product( $item['product_id'] ); $product_name[] = $product->get_title(); $sku[] = $product->get_sku(); $qty[] = $item['qty']; $total[] = $item['line_total']; }
$email = $order->billing_email; $totalSpent = $order->get_total(); $deliveryTax = $order->get_shipping_tax(); $value = implode( '|', $total ); $quantity = implode( '|', $qty ); $productName = implode( '|', $product_name ); $sku = implode("|", $sku);
echo '';
echo ''; echo 'https://imgs.ebit.com.br/ebitBR/selo-ebit/js/getSelo.js?'%20.%20$store_id%20.%20'&lightbox=true';
}
Porem não funciona, alguem consegue ajudar?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prezados achei o seguinte código a ser adicionado no Functions.php para add o banner do E-Bit no woocommerce:
?php
add_action( 'woocommerce_thankyou', 'ebit_banner' );
function ebit_banner( $order_id ) {
$store_id = ''; // o ID da sua loja
$buscape_id = ''; // o ID único do Buscapé
$order = wc_get_order( $order_id );
$order_items = $order->get_items();
foreach ( $order_items as $item ) {
$product = wc_get_product( $item['product_id'] );
$product_name[] = $product->get_title();
$sku[] = $product->get_sku();
$qty[] = $item['qty'];
$total[] = $item['line_total'];
}
$email = $order->billing_email;
$totalSpent = $order->get_total();
$deliveryTax = $order->get_shipping_tax();
$value = implode( '|', $total );
$quantity = implode( '|', $qty );
$productName = implode( '|', $product_name );
$sku = implode("|", $sku);
echo '';
echo '';
echo 'https://imgs.ebit.com.br/ebitBR/selo-ebit/js/getSelo.js?'%20.%20$store_id%20.%20'&lightbox=true';
}
Porem não funciona, alguem consegue ajudar?
The text was updated successfully, but these errors were encountered: