akent64
Forum Replies Created
-
That doesn’t just help, that’s amazing!!!
Thanks you so much, I hope will help others looking for a solution aswel ๐
Thanks so much, this is showing on the invoice for simple products but not variable products, when I add in the advised fix it shows for variable but not for simple products, so I can never view the extra fields if an order contains both types of product
function wc_add_custom_fields_save( $post_id ){
// Text Field
$woocommerce_product_information = $_POST[‘_product_information’];
if( isset( $woocommerce_product_information ) )
update_post_meta( $post_id, ‘_product_information’, esc_attr( $woocommerce_product_information ) );
// Text Field
$woocommerce_print_information = $_POST[‘_print_information’];
if( isset( $woocommerce_print_information ) )
update_post_meta( $post_id, ‘_print_information’, esc_attr( $woocommerce_print_information ) );
// Text Field
$woocommerce_custom_text_font = $_POST[‘_custom_text_font’];
if( isset( $woocommerce_custom_text_font ) )
update_post_meta( $post_id, ‘_custom_text_font’, esc_attr( $woocommerce_custom_text_font ) );
// Text Field
$woocommerce_custom_text_colour = $_POST[‘_custom_text_colour’];
if( isset( $woocommerce_custom_text_colour ) )
update_post_meta( $post_id, ‘_custom_text_colour’, esc_attr( $woocommerce_custom_text_colour ) );
// Text Field
$woocommerce_custom_text_position = $_POST[‘_custom_text_position’];
if( isset( $woocommerce_custom_text_position ) )
update_post_meta( $post_id, ‘_custom_text_position’, esc_attr( $woocommerce_custom_text_position ) );
// Text Field
$woocommerce_custom_text_height = $_POST[‘_custom_text_height’];
if( isset( $woocommerce_custom_text_height ) )
update_post_meta( $post_id, ‘_custom_text_height’, esc_attr( $woocommerce_custom_text_height ) );}
add_action( ‘wpo_wcpdf_after_item_meta’, ‘wpo_wcpdf_product_custom_field’, 10, 3 );
function wpo_wcpdf_product_custom_field ( $template_type, $item, $order ) {
// check if product exists first
if (empty($item[‘product’])) return;// replace ‘Location’ with your custom field name!
$field_name = ‘_product_information’;
$_product_information = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
$field_name = ‘_print_information’;
$_print_information = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
$field_name = ‘_custom_text_font’;
$_custom_text_font = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
$field_name = ‘_custom_text_colour’;
$_custom_text_colour = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
$field_name = ‘_custom_text_position’;
$_custom_text_position = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
$field_name = ‘_custom_text_height’;
$_custom_text_height = method_exists($item[‘product’], ‘get_meta’) ? $item[‘product’]->get_meta($field_name,true,’edit’) : get_post_meta( $item[‘product’]->id, $field_name, true );
if (!empty($_product_information)) {
echo ‘<div class=”invoice-information”><b>Product Information: </b>’.$_product_information.'</div>’;
}
if (!empty($_print_information)) {
echo ‘<div class=”invoice-information”><b>Print Information: </b>’.$_print_information.'</div>’;
}
if (!empty($_custom_text_font OR $_custom_text_colour OR $_custom_text_position OR $_custom_text_height)) {
echo ‘<div class=”invoice-information”><b>Custom Text Info: </b>’.$_custom_text_font.’, ‘.$_custom_text_colour.’, ‘.$_custom_text_position.’, ‘.$_custom_text_height.'</div>’;
}
}add_filter( ‘wc_product_enable_dimensions_display’, ‘__return_false’ );
add_action( ‘wpo_wcpdf_custom_styles’, ‘wpo_wcpdf_custom_styles’ );
function wpo_wcpdf_custom_styles () {
?>
.invoice-information {
color: grey;
font-size: 0.8em;
}.weight {
display: none;
}<?php
}Forum: Plugins
In reply to: [PayPal Express Checkout] Pending paymentsI have tried your recommended code but still have the same issue, it seem to go through the complete process but no payment is taken from the buyers account nor does anything end up in the receivers account.
Also this is my shortcode …
[paypal amount=”43.00″ currency=”GBP” description=”Goes here” button_style=”buy_now” return_url=”http://url.co.uk/membership-payment-complete” cancel_url=”http://url.co.uk/payment-cancelled”%5D
Forum: Plugins
In reply to: [Widget Settings Importer/Exporter] Doesnt Work with json fileWhen in Plugins > Add New – Search for “Widget Settings Importer Exporter” NOT “Widget Settings Importer/Exporter”
Removing the “/” will give you the correct plugin to install
I removed the <h3> </h3> tags and it seems to of fixed the memory error. Can anyone advise me on why this might of been causing the issue?
Thanks
Line 79 –
<h3>
<?php printf(_x(‘Invoice #%s on %s’, ‘Invoice # header. E.g. Invoice #ABCDEF on 2013-01-01.’, ‘pmpro’), $pmpro_invoice->code, date(get_option(‘date_format’), $pmpro_invoice->timestamp));?>
</h3>
Is it also possible to link the wordpress and buddypress profile fields to PMPro?
Can I ask, what file did you put this code in to hide buddypress features and pages from non-memberships?
I would like to restrict users who do not have memberships from accessing the groups, activity and other pages. But allow the forums to membership levels ID=1 to ID=infinity
Forum: Plugins
In reply to: [BuddyPress Custom Profile Menu] Clicking on tab, styles the page incorrectlyThank you for your reply. So the reason for the styling is down to the version of buddypress? When upgrading this plugin, this will correct these issues?
I will continue to design the pages that i’m using for the tabs and will await your upgrade.
Thanks in advance