I have a custom defined list relationship field type. I want to add some other data in custom defined options. But i want to do that programmatically either using API or built-in function from this plugin. I have checked the data structure using pods->field(‘my_field’) I have checked in postman for the the data structure using pods->field(‘my_field’) where the custom defined list is represented as pick_custom. I want to add new options to that custom defined list programmatically.
]]>I am trying to programmatically add a woocomerce product to my bundle based on certain conditions, my guess was using the “woocommerce_bundled_items” filter and adding a WC_Bundled_Item object to the bundled_items variable, but i can not figure out how to convert a WC_Product class into a WC_Bundled_Item class. Is this even possible?
Example:
// First we hook our own function with the_content event
add_filter( 'woocommerce_bundled_items', 'wpb_content_filter', 10, 2 );
// Now we define what our function would do.
// In this example it displays an image if a post is in news category.
function wpb_content_filter( array $bundled_items, WC_Product_Bundle $bundle ) {
$product = wc_get_product( 180 );
$t = new WC_Bundled_Item($product);
$bundled_items[] = $product;
// Returns the content.
return $bundled_items;
}
]]>I’m curious if it’s possible to programmatically hide a menu created by the Admin Menu Editor, using functions like remove_menu_page()
or remove_submenu_page()
. Could you please provide some guidance?
Is it possible to specify multiple posts when scheduling expiration programmatically?
I want to get the post ID from the author ID and term and execute it.
Regards,
]]>i’ve got this website in spanish and also in english. On the contact page, there’s a simple form that i developed programmatically. So my question is: how can i redirect to the same page but with get content in the url? Example: “https://wordpress-773944-2631041.cloudwaysapps.com/en/contactar/?received=1” based on the selected language by the user?
If i code wp_redirect(‘/en/contactar?received=’.$sent); it won’t show me the page that i want.
Thanks.
]]>