foreach ( WC()->cart->get_cart() as $cart_item ) {
$deliveryDays[] = get_post_meta( $cart_item['variation_id'], 'custom_field', true);
}
I tried
get_post_meta($cart_item['variation_id'], 'delivery_week', true);
Where delivery week is the name of custom field.
I see you have a hook when order is placed
wc_get_order_item_meta($orderID, 'delivery_week', $single = true );
Do we have something similar so I can get the value when looping through the cart in the cart page?
Thanks in advance.
]]>a) ist that possible at all without coding?
b) do the accordion and contact form need to be on the same page?
c) any chance that might work with some simple shortcode oder post/get command?
Thanks a lot for help!
Wolfgang
It’s me again haha, I need to get the value of one single collumn, but of all rows.
=<a href="https://malf88.xyz/certificados/certificados/certificado.php?id_atleta={C2}&id_table=8&file=https://www.chiprun.com.br/wp-content/uploads/2019/01/Certificado_Cost%C3%A3o_2019_V2.png'">Imprimir</a>
This is the button code i’m using, and I need to change the C2 ( collum C Row 2 ) to the value, so i dont need to change manually to C3, C4, C5, C6,… because sometimes it’s just 50rows, and sometimes 500rows. So do mannualy it’s kind bad.
I hope you can understand what i mean.
Thanks
]]>I have a little issue. On my WordPress I recive a variable by url. But the variable is encrypted, so I need to decrypt it. For this reason I did a little plugin. I would like that the result of decrypt will be the content for name field on zendesk form. I don’t know how to do unless I modificated the plugin, and I think that it’s a bad solution. Can you help me please?
P.D.: My plugin it’s only for decrypt and return the result, does nothing more.
]]>Here is code which creating fields in setting:
class WC_checkout_extension {
/**
* Bootstraps the class and hooks required actions & filters.
*
*/
public static function init() {
add_filter( 'woocommerce_settings_tabs_array', __CLASS__ . '::add_settings_tab', 50 );
add_action( 'woocommerce_settings_tabs_settings_tab_demo', __CLASS__ . '::settings_tab' );
add_action( 'woocommerce_update_options_settings_tab_demo', __CLASS__ . '::update_settings' );
}
/**
* Add a new settings tab to the WooCommerce settings tabs array.
*
* @param array $settings_tabs Array of WooCommerce setting tabs & their labels, excluding the Subscription tab.
* @return array $settings_tabs Array of WooCommerce setting tabs & their labels, including the Subscription tab.
*/
public static function add_settings_tab( $settings_tabs ) {
$settings_tabs['settings_tab_demo'] = __( 'Platební roz?í?ení', 'woocommerce-settings-tab-demo' );
return $settings_tabs;
}
/**
* Uses the WooCommerce admin fields API to output settings via the @see woocommerce_admin_fields() function.
*
* @uses woocommerce_admin_fields()
* @uses self::get_settings()
*/
public static function settings_tab() {
woocommerce_admin_fields( self::get_settings() );
}
/**
* Uses the WooCommerce options API to save settings via the @see woocommerce_update_options() function.
*
* @uses woocommerce_update_options()
* @uses self::get_settings()
*/
public static function update_settings() {
woocommerce_update_options( self::get_settings() );
}
/**
* Get all the settings for this plugin for @see woocommerce_admin_fields() function.
*
* @return array Array of settings for @see woocommerce_admin_fields() function.
*/
public static function get_settings() {
$settings = array(
'section_title' => array(
'name' => __( 'Nastavení událostí, kde p?evzít (zatím je?tě není nefunguje).', 'woocommerce-settings-tab-demo' ),
'type' => 'title',
'desc' => '',
'id' => 'WC_checkout_extension_section_title'
),
'action1' => array(
'name' => __( 'Akce 1', 'woocommerce-settings-tab-demo' ),
'type' => 'text',
'desc' => __( 'Napi? datum a název akce, pro p?evzetí.', 'woocommerce-settings-tab-demo' ),
'id' => 'WC_checkout_extension_action1'
),
'action2' => array(
'name' => __( 'Akce 2', 'woocommerce-settings-tab-demo' ),
'type' => 'text',
'desc' => __( 'Napi? datum a název akce, pro p?evzetí.', 'woocommerce-settings-tab-demo' ),
'id' => 'WC_checkout_extension_action2'
),
'action3' => array(
'name' => __( 'Akce 3', 'woocommerce-settings-tab-demo' ),
'type' => 'text',
'desc' => __( 'Napi? datum a název akce, pro p?evzetí.', 'woocommerce-settings-tab-demo' ),
'id' => 'WC_checkout_extension_action3'
),
'action4' => array(
'name' => __( 'Akce 4', 'woocommerce-settings-tab-demo' ),
'type' => 'text',
'desc' => __( 'Napi? datum a název akce, pro p?evzetí.', 'woocommerce-settings-tab-demo' ),
'id' => 'WC_checkout_extension_action4'
),
'action5' => array(
'name' => __( 'Akce 5', 'woocommerce-settings-tab-demo' ),
'type' => 'text',
'desc' => __( 'Napi? datum a název akce, pro p?evzetí.', 'woocommerce-settings-tab-demo' ),
'id' => 'WC_checkout_extension_action5'
),
);
return apply_filters( 'WC_checkout_extension_settings', $settings );
}
}
WC_checkout_extension::init();
And i need to get values of fields into this list:
function kia_filter_checkout_fields($fields){
$fields['extra_fields'] = array(
'another_field' => array(
'type' => 'select',
'options' => array( 'a' => __('Akce 1'), 'b' => __( 'Akce 2' ), 'c' => __( 'Akce 3' ) ),
'required' => false,
'label' => __( 'Vyber si akci, na které bys chtěl objednávku vyzvednout' )
)
);
return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'kia_filter_checkout_fields');
Thanks for help
https://www.ads-software.com/plugins/woocommerce/
]]>Is it possible to place the parameter value as placeholder text? If so, how?
Thanks,
Costa
https://www.ads-software.com/plugins/contact-form-7-get-and-show-parameter-from-url/
]]>How can i get a value from a post, without showing the value in the url, i want to send the_post_thumbnail url and get the value in my contact form.
Thanks in advance
https://www.ads-software.com/plugins/contact-form-7-dynamic-text-extension/
]]>I trying to get a filed value to other spot in the same form? not may tutorials for newbies with word press.
https://www.ads-software.com/plugins/contact-form-7-dynamic-text-extension/
]]>function myplugin_cac_column_featured_image_value( $value, $postid, $column, $post_type ) {
// Organization (Common) Column
if ( $column->properties->name == 'column-meta-6' && $value ) {
$org_common = $value;
}
// Organization Column
if ( $column->properties->name == 'column-meta-5' && !$value ) {
$value = $org_common;
}
return $value;
}
add_filter( 'cac/column/value', 'myplugin_cac_column_featured_image_value', 10, 4 );
Any suggestions?
https://www.ads-software.com/plugins/codepress-admin-columns/
]]>